Config: Configure Sentry for frontend #636
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR configures Sentry for the frontend (React) part of the application. This means that errors that occur in the browser will be send to Sentry automatically. Currently, I've configured it so that only 10% of the errors ocurring will be posted to Sentry to prevent us going over the limit. We can play with this percentage through time.
Browser errors that happen in both ACC and PROD will be sent to Sentry. In Sentry we can filter them based on their origin domain and many other factors.
I would like to share the credentials with you so you can also see the Sentry dashboard on Sentry.io, is there an official way to do it?
How to test this?
.env
file with the keyREACT_APP_SENTRY_DSN
frontend/src/components/App/App.js
:Sentry DSN not found (...)
.http://localhost:3000/throw-error
Throw error
button. You might want to do it more than once as the sample rate has been set to send only 10% of errors to Sentry.xxx.ingest.sentry.io/api/...