Skip to content

feat(react): Add React version to events #12390

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 4 commits into from
Jun 18, 2024
Merged

Conversation

AbhiPrasad
Copy link
Member

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.

@AbhiPrasad AbhiPrasad requested review from a team, stephanie-anderson, andreiborza and Lms24 and removed request for a team June 6, 2024 14:14
import { applySdkMetadata } from '@sentry/core';

import { version } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

how nice of them to export this. I wish more packages did that.

Copy link
Member

Choose a reason for hiding this comment

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

just to sanity check, is this exported in all react versions (*that we support)?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it is

Copy link
Contributor

github-actions bot commented Jun 6, 2024

size-limit report 📦

Path Size
@sentry/browser 22.03 KB (0%)
@sentry/browser (incl. Tracing) 33.2 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.94 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.27 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.01 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.19 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.02 KB (0%)
@sentry/browser (incl. metrics) 26.21 KB (0%)
@sentry/browser (incl. Feedback) 38.24 KB (0%)
@sentry/browser (incl. sendFeedback) 26.65 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.22 KB (0%)
@sentry/react 24.77 KB (-0.12% 🔽)
@sentry/react (incl. Tracing) 36.25 KB (-0.1% 🔽)
@sentry/vue 26.03 KB (0%)
@sentry/vue (incl. Tracing) 35.06 KB (0%)
@sentry/svelte 22.17 KB (0%)
CDN Bundle 23.36 KB (0%)
CDN Bundle (incl. Tracing) 34.89 KB (0%)
CDN Bundle (incl. Tracing, Replay) 68.99 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.19 KB (0%)
CDN Bundle - uncompressed 68.68 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 103.29 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 213.74 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 226.33 KB (0%)
@sentry/nextjs (client) 36.14 KB (+1.49% 🔺)
@sentry/sveltekit (client) 33.83 KB (0%)
@sentry/node 112.67 KB (0%)
@sentry/node - without tracing 90.07 KB (0%)
@sentry/aws-serverless 99.16 KB (0%)

@AbhiPrasad AbhiPrasad force-pushed the abhi-react-version branch from ade4c8e to ae28b65 Compare June 17, 2024 19:15
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) June 18, 2024 17:48
@AbhiPrasad AbhiPrasad merged commit a08335d into develop Jun 18, 2024
93 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-react-version branch June 18, 2024 18:00
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.

4 participants