Skip to content

fix(browser): Send web vital span sentry.segment.name attribute#22024

Merged
Lms24 merged 2 commits into
developfrom
lms/fix-browser-wv-sentry.segment.name
Jul 7, 2026
Merged

fix(browser): Send web vital span sentry.segment.name attribute#22024
Lms24 merged 2 commits into
developfrom
lms/fix-browser-wv-sentry.segment.name

Conversation

@Lms24

@Lms24 Lms24 commented Jul 7, 2026

Copy link
Copy Markdown
Member

Fixes a (as I learned today) bug, where we sent an outdated attribute on streamed web vital spans. TIL:

  • the sentry.transaction attribute no longer has an effect but was previously used to cluster and group web vital spans by "page" (i.e. transaction name)
  • instead we now send sentry.segment.name which will be picked up by relay correctly.

Why do we need this at all? This attribute tells the Sentry backend that the web vital belongs to a certain route. Relay treats this the same as if the span had an actual top level transaction/segment name property.

@Lms24 Lms24 requested a review from a team as a code owner July 7, 2026 16:17
@Lms24 Lms24 requested review from logaretm and mydea and removed request for a team July 7, 2026 16:17

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 87124f0. Configure here.

Comment thread packages/browser-utils/src/metrics/webVitalSpans.ts
@Lms24 Lms24 self-assigned this Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.59 kB - -
@sentry/browser - with treeshaking flags 26.03 kB - -
@sentry/browser (incl. Tracing) 46.27 kB +0.05% +23 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.03 kB +0.05% +20 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.03 kB +0.04% +17 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.56 kB +0.04% +27 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.17 kB +0.04% +30 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 90.26 kB +0.03% +24 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 102.91 kB +0.02% +18 B 🔺
@sentry/browser (incl. Feedback) 44.76 kB - -
@sentry/browser (incl. sendFeedback) 32.38 kB - -
@sentry/browser (incl. FeedbackAsync) 37.51 kB - -
@sentry/browser (incl. Metrics) 28.67 kB - -
@sentry/browser (incl. Logs) 28.91 kB - -
@sentry/browser (incl. Metrics & Logs) 29.59 kB - -
@sentry/react 29.38 kB - -
@sentry/react (incl. Tracing) 48.53 kB +0.04% +15 B 🔺
@sentry/vue 33.03 kB - -
@sentry/vue (incl. Tracing) 48.16 kB +0.11% +50 B 🔺
@sentry/svelte 27.61 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 48.26 kB +0.04% +19 B 🔺
CDN Bundle (incl. Logs, Metrics) 31.57 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.57 kB +0.07% +31 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.81 kB - -
CDN Bundle (incl. Tracing, Replay) 85.73 kB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.04 kB +0.01% +4 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 91.55 kB +0.03% +22 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.83 kB +0.02% +12 B 🔺
CDN Bundle - uncompressed 89.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 145.99 kB +0.03% +31 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.05 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 149.96 kB +0.03% +31 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.75 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.16 kB +0.02% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.12 kB +0.02% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.86 kB +0.02% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.81 kB +0.02% +31 B 🔺
@sentry/nextjs (client) 50.94 kB -0.01% -2 B 🔽
@sentry/sveltekit (client) 46.68 kB +0.06% +26 B 🔺
@sentry/core/server 78.38 kB - -
@sentry/core/browser 64.72 kB - -
@sentry/node-core 63.21 kB - -
@sentry/node 123.7 kB +0.01% +1 B 🔺
@sentry/node (incl. diagnostics channel injection) 129.62 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.72 kB +0.01% +1 B 🔺
@sentry/node - without tracing 74.82 kB - -
@sentry/aws-serverless 85.59 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 181.68 kB - -
@sentry/cloudflare (withSentry) 449.39 kB - -

View base workflow run

@Lms24 Lms24 enabled auto-merge (squash) July 7, 2026 16:41
@Lms24 Lms24 merged commit 9aa2138 into develop Jul 7, 2026
207 checks passed
@Lms24 Lms24 deleted the lms/fix-browser-wv-sentry.segment.name branch July 7, 2026 16:56
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