Skip to content

feat(browser): Add user agent to INP standalone span attributes #12896

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 3 commits into from
Jul 16, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 12, 2024

This PR adds the window.navigator.userAgent string as the user_agent.original attribute to INP standalone spans.

I decided to specifically add this attribute in the INP handler when starting the span for now because we can generalize this to more standalone spans later on if we need it. Saves us a bit of bundle size for the moment.

This is part of making INP value collection more robust by ensuring we send the user agent also when tunneling is used where the user agent usually isn't forwarded to the Sentry backend.

closes #12689

Copy link
Contributor

github-actions bot commented Jul 12, 2024

size-limit report 📦

Path Size
@sentry/browser 22.3 KB (0%)
@sentry/browser (incl. Tracing) 33.69 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.47 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.8 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.52 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 86.18 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 88.03 KB (+0.03% 🔺)
@sentry/browser (incl. metrics) 26.59 KB (0%)
@sentry/browser (incl. Feedback) 38.98 KB (0%)
@sentry/browser (incl. sendFeedback) 26.92 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.54 KB (0%)
@sentry/react 25.07 KB (0%)
@sentry/react (incl. Tracing) 36.75 KB (+0.05% 🔺)
@sentry/vue 26.41 KB (0%)
@sentry/vue (incl. Tracing) 35.57 KB (+0.06% 🔺)
@sentry/svelte 22.44 KB (0%)
CDN Bundle 23.52 KB (0%)
CDN Bundle (incl. Tracing) 35.47 KB (+0.07% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.57 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.77 KB (+0.03% 🔺)
CDN Bundle - uncompressed 69 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 104.91 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 215.3 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 228.02 KB (+0.03% 🔺)
@sentry/nextjs (client) 36.62 KB (+0.05% 🔺)
@sentry/sveltekit (client) 34.34 KB (+0.05% 🔺)
@sentry/node 130.8 KB (0%)
@sentry/node - without tracing 91.88 KB (0%)
@sentry/aws-serverless 117.06 KB (0%)

@Lms24 Lms24 self-assigned this Jul 12, 2024
@Lms24 Lms24 marked this pull request as ready for review July 12, 2024 13:53
@Lms24 Lms24 merged commit 9d1b35d into develop Jul 16, 2024
117 checks passed
@Lms24 Lms24 deleted the lms/feat-browser-inp-spans-user-agent branch July 16, 2024 10:43
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.

Set user agent span attribute on standalone spans
3 participants