Skip to content

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

Draft
Lms24 wants to merge 5 commits into
developfrom
lms/feat-low-card-span-names-pageload
Draft

feat: Emit low-cardinality pageload span names when streaming spans#23424
Lms24 wants to merge 5 commits into
developfrom
lms/feat-low-card-span-names-pageload

Conversation

@Lms24

@Lms24 Lms24 commented Aug 13, 2026

Copy link
Copy Markdown
Member

No description provided.

startBrowserTracingPageLoadSpan(client, {
name: parameterizedPathname ?? pathname,
// With span streaming, span names have to be low cardinality, so we can't fall back to the URL.
name: parameterizedPathname ?? (hasSpanStreamingEnabled(client) ? 'Pageload' : pathname),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Static routes named Pageload

High Severity

maybeParameterizeRoute / maybeParameterizeRemixRoute intentionally return nothing for known static manifest routes because those paths are already low-cardinality. The new streaming fallback treats that as “no route” and renames them to Pageload, so distinct static pages collapse into one span name.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 02f7a71. Configure here.

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 📦

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 116.99 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 81.43 kB - -
@sentry/aws-serverless 90.92 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 213.98 kB - -
@sentry/cloudflare (withSentry) 528.93 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.

expect(pageloadSpan.attributes).toMatchObject({
['sentry.segment.name.source']: 'url',
['url.pathname']: '/pageload-tracing',
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wrong streamed span attribute assertions

Medium Severity

The new toMatchObject checks compare streamed span attributes to plain strings and look up url.pathname, but serialized streamed attributes are { type, value } objects keyed as url.path. Sibling assertions in the same files already use ?.value and the url.path convention, so these expectations will fail.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1a7dc4f. Configure here.

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.

1 participant