feat(react): Add React version to events#12390
Merged
AbhiPrasad merged 4 commits intodevelopfrom Jun 18, 2024
Merged
Conversation
lforst
reviewed
Jun 6, 2024
| import { init as browserInit, setContext } from '@sentry/browser'; | ||
| import { applySdkMetadata } from '@sentry/core'; | ||
|
|
||
| import { version } from 'react'; |
Contributor
There was a problem hiding this comment.
how nice of them to export this. I wish more packages did that.
Member
There was a problem hiding this comment.
just to sanity check, is this exported in all react versions (*that we support)?
lforst
approved these changes
Jun 6, 2024
Contributor
size-limit report 📦
|
Lms24
approved these changes
Jun 6, 2024
ade4c8e to
ae28b65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Given React 19 has changes with error handling, we may want to treat it differently in the product. (see https://www.notion.so/sentry/React-JS-19-23a7a2c5f88d4ef59a4b9647c84333a3?d=98df57f2272d482fa12a3c0618b43fc4#9bb5d5f0a9604508bb290fd7405fcce0 as an example).
To make this easier, we now attach the react version as context on all outgoing events.