feat(sentry): Add sentry integration for inventory #2268
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 adds the ability to upload source maps from inventory into sentry. It also adds the pointer to tell sentry which project to send the error too.
Testing is a bit tricky, as currently you need to run chrome-prod in tandem with inventory to test the actual error.
in inventory, you need to add the script
"static" : "fec static
" to the package.json file, and then runnpm run static
You can create an easy error by adding
<button onClick={() => methodDoesNotExist()}>
anywhere in inventory and clicking the button.this to routes
...(true && { '/apps/inventory': { host: 'http://localhost:8003', }, }),
-> and run npm run dev.
Observer that the error then goes to the inventory-rhel project and has valuable data inside.
Here is an example: https://red-hat-it.sentry.io/issues/5999468439/?project=4507454722211840&referrer=onboarding-first-event-indicator