Skip to content

feat: Emit low-cardinality pageload span names when streaming spans - #23424

Merged
Lms24 merged 7 commits into
developfrom
lms/feat-low-card-span-names-pageload
Aug 24, 2026
Merged

feat: Emit low-cardinality pageload span names when streaming spans#23424
Lms24 merged 7 commits into
developfrom
lms/feat-low-card-span-names-pageload

Conversation

@Lms24

@Lms24 Lms24 commented Aug 13, 2026

Copy link
Copy Markdown
Member

This PR adjusts all sentry.op: 'pageload' spans to only emit low cardinality span names if span streaming is enabled.

Concretely, for pageload spans, this means that we want to never set a raw URL as a span name, which was the current fallback for transaction-based span names. Instead, we now fall back to a static "Pageload" span name.

The new low-cardinality pageload span names now adhere to the rules set in conventions.

ref #22350

Comment thread packages/nextjs/src/client/routing/appRouterRoutingInstrumentation.ts Outdated
Comment thread packages/react/src/reactrouter-compat-utils/instrumentation.tsx Outdated
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 30.3 kB - -
@sentry/browser - with treeshaking flags 28.47 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.81 kB - -
@sentry/browser (incl. Tracing) 48.6 kB +0.04% +18 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.61 kB +0.05% +23 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.49 kB +0.07% +32 B 🔺
@sentry/browser (incl. Tracing, Replay) 88 kB +0.03% +22 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.4 kB +0.06% +40 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 92.72 kB +0.02% +18 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 105.43 kB +0.04% +38 B 🔺
@sentry/browser (incl. Feedback) 47.65 kB - -
@sentry/browser (incl. sendFeedback) 35.13 kB - -
@sentry/browser (incl. FeedbackAsync) 40.28 kB - -
@sentry/browser (incl. Metrics) 31.24 kB - -
@sentry/browser (incl. Logs) 31.52 kB - -
@sentry/browser (incl. Metrics & Logs) 32.15 kB - -
@sentry/react 32.09 kB - -
@sentry/react (incl. Tracing) 50.79 kB +0.05% +25 B 🔺
@sentry/vue 35.34 kB - -
@sentry/vue (incl. Tracing) 50.59 kB +0.09% +45 B 🔺
@sentry/svelte 30.33 kB - -
CDN Bundle 31.61 kB - -
CDN Bundle (incl. Tracing) 48.94 kB +0.1% +45 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.8 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.85 kB +0.07% +35 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 74.31 kB - -
CDN Bundle (incl. Tracing, Replay) 86.5 kB +0.03% +24 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.35 kB +0.04% +35 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 92.21 kB +0.04% +28 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.16 kB +0.04% +35 B 🔺
CDN Bundle - uncompressed 93.84 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.77 kB +0.02% +26 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.14 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.46 kB +0.02% +26 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.08 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.04 kB +0.01% +26 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.71 kB +0.01% +26 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.73 kB +0.01% +26 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.4 kB +0.01% +26 B 🔺
@sentry/nextjs (client) 53.34 kB +0.1% +51 B 🔺
@sentry/sveltekit (client) 49.01 kB +0.04% +15 B 🔺
@sentry/core/server 65.41 kB +0.04% +23 B 🔺
@sentry/core/browser 51.76 kB +0.09% +43 B 🔺
@sentry/node 117.47 kB +0.02% +22 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.18 kB - -
@sentry/node - without tracing 82 kB +0.03% +23 B 🔺
@sentry/aws-serverless 91.37 kB +0.03% +27 B 🔺
@sentry/cloudflare (withSentry) - minified 194.46 kB - -
@sentry/cloudflare (withSentry) 480.88 kB - -

View base workflow run

Comment thread packages/browser/src/tracing/browserTracingIntegration.ts

@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.

There are 2 total unresolved issues (including 1 from previous review).

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 1a7dc4f. Configure here.

@RulaKhaled RulaKhaled left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks solid overall 👏 left two questions regarding static routes, and the new e2e assertions

Comment thread packages/remix/src/client/performance.tsx
Comment thread packages/core/src/constants.ts
The streaming E2E specs asserted a `url.pathname` attribute that no SDK code
sets. Pageload spans carry `url.path`, set by `browserTracingIntegration` when
it creates the route span, so these assertions could never match.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 marked this pull request as ready for review August 24, 2026 09:19
@Lms24
Lms24 requested review from a team as code owners August 24, 2026 09:19
@Lms24
Lms24 requested review from chargome, logaretm, msonnb and nicohrubec and removed request for a team August 24, 2026 09:19

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@Lms24 Lms24 self-assigned this Aug 24, 2026
@Lms24
Lms24 merged commit 51c5eda into develop Aug 24, 2026
273 of 274 checks passed
@Lms24
Lms24 deleted the lms/feat-low-card-span-names-pageload branch August 24, 2026 10:58
JPeer264 pushed a commit that referenced this pull request Aug 25, 2026
…23424)

This PR adjusts all `sentry.op: 'pageload'` spans to only emit low
cardinality span names if span streaming is enabled.

Concretely, for pageload spans, this means that we want to never set a
raw URL as a span name, which was the current fallback for
transaction-based span names. Instead, we now fall back to a static
`"Pageload"` span name.

The new low-cardinality pageload span names now adhere to the rules set
in
[conventions](https://getsentry.github.io/sentry-conventions/names/#browser-pageload).

ref #22350

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

3 participants