Skip to content

feat(nextjs): Add mechanism to withSentry-caught errors #4046

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

Merged
merged 2 commits into from
Oct 11, 2021

Conversation

lobsterkatie
Copy link
Member

This switches the mechanism value from generic to withSentry for exceptions caught by the withSentry wrapper.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.33 KB (-0.01% 🔽)
@sentry/browser - Webpack 23.31 KB (0%)
@sentry/react - Webpack 23.34 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.79 KB (0%)

Copy link
Contributor

@kamilogorek kamilogorek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but important change

@lobsterkatie lobsterkatie merged commit 7496f0a into master Oct 11, 2021
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-add-withSentr-mechanism branch October 11, 2021 15:32
lobsterkatie added a commit that referenced this pull request Oct 20, 2021
Though we have an existing `Mechanism` type, we haven't actually been using it in `addExceptionMechanism`. As a result, I didn't catch the fact that the `mechanism` data I added in #4046 was malformed, and therefore being ignored by Sentry.

This fixes both of those problems (the not using of the type and the malformed data being sent). Using the correct type also allowed `addExceptionMechanism` to be streamlined quite a bit.

Finally, given that the question of what the different attributes and their values actually mean has come up more than once, I conferred with the team, and added a docstring to the type. Hopefully this will help anyone who needs to add `mechanism` data in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants