Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a client-side logging #3262

Closed
5 tasks done
frankeros opened this issue May 19, 2021 · 1 comment
Closed
5 tasks done

Implement a client-side logging #3262

frankeros opened this issue May 19, 2021 · 1 comment
Assignees
Labels
back-end Thins related to the server side error-handling pending-PO Taks pending for PO validation and priorization

Comments

@frankeros
Copy link
Contributor

frankeros commented May 19, 2021

Parent Issue
#3271

Description
In order to handle JS exceptions from components, we need to implement client-side logging using React error boundaries with a service to send the errors to the backend to store them.

Tasks:

Acceptance criteria

  • Not all errors should be sent to the backend, only logs categorized with a certain level or higher.
  • The errors displayed in the UI must be clear to the user and not prevent the use of the app.
  • The component must display only NO business errors, the business errors must be handled by the corresponding component.
  • The error orchestrator must be responsible for manage what to do with the errors according to the error level and interfaces.

Alternatives
Check the libs loglevel and loglevel-plugin-remote.
Here an example with error boundary and loglevel.

@frankeros frankeros added error-handling frontend back-end Thins related to the server side and removed backend labels May 19, 2021
@frankeros frankeros added the pending-PO Taks pending for PO validation and priorization label May 20, 2021
@gabiwassan gabiwassan self-assigned this May 31, 2021
@frankeros
Copy link
Contributor Author

frankeros commented May 31, 2021

Define log level strategy (logging and UI representation).

Levels:
--- 2 tier ---

  • Verbose
  • Debug
  • Info
  • Warning
    --- 1 tier ---
  • Error
    • UI: A React component crash but, the app continues working (propose Toast and console.log)
    • Bussines: It's an expected and handled error but is necessary to display or log for the user. Display and log should be optional.
    • Critical: The app doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Thins related to the server side error-handling pending-PO Taks pending for PO validation and priorization
Projects
None yet
Development

No branches or pull requests

4 participants