Skip to content

feat: Emit low-cardinality http.server span names in framework SDKs - #23597

Merged
chargome merged 1 commit into
charlygomez/js-3412-http-span-names-corefrom
charlygomez/js-3412-http-span-names-frameworks
Aug 26, 2026
Merged

chargome merged 1 commit into
charlygomez/js-3412-http-span-names-corefrom
charlygomez/js-3412-http-span-names-frameworks

Conversation

@chargome

Copy link
Copy Markdown
Member

Applies the same span-streaming gate across the runtime and framework SDKs so no integration keeps a raw URL in an http.server span name; routed requests are unchanged. Stacked on #23596.
Worth a closer look: remix reads its own span name back, sveltekit also renames SvelteKit's native root span, and nextjs renames in a spanStart hook because Next.js creates that span. Refs #23527

@chargome chargome self-assigned this Aug 25, 2026
@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

JS-3412

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.57 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.58 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.6 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.51 kB - -
@sentry/browser (incl. Tracing, Replay) 88.06 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.76 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.47 kB - -
@sentry/browser (incl. Feedback) 45.81 kB - -
@sentry/browser (incl. sendFeedback) 33.36 kB - -
@sentry/browser (incl. FeedbackAsync) 38.46 kB - -
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.31 kB - -
@sentry/react (incl. Tracing) 50.79 kB - -
@sentry/vue 35.69 kB - -
@sentry/vue (incl. Tracing) 50.82 kB - -
@sentry/svelte 28.59 kB - -
CDN Bundle 30.36 kB - -
CDN Bundle (incl. Tracing) 49.07 kB - -
CDN Bundle (incl. Logs, Metrics) 32.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.95 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73 kB - -
CDN Bundle (incl. Tracing, Replay) 86.58 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.27 kB - -
CDN Bundle - uncompressed 89.97 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.69 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.38 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.42 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.18 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.88 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.55 kB - -
@sentry/nextjs (client) 53.33 kB - -
@sentry/sveltekit (client) 49.03 kB - -
@sentry/core/server 65.3 kB +0.18% +111 B 🔺
@sentry/core/browser 52.35 kB - -
@sentry/node 122.7 kB +0.05% +59 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.22 kB - -
@sentry/node - without tracing 87.95 kB +0.03% +21 B 🔺
@sentry/aws-serverless 96.18 kB +0.08% +71 B 🔺
@sentry/cloudflare (withSentry) - minified 199.57 kB +0.04% +74 B 🔺
@sentry/cloudflare (withSentry) 495.71 kB +0.06% +257 B 🔺

View base workflow run

@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch from 80e4f09 to ef8061b Compare August 26, 2026 07:20
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread packages/bun/src/integrations/bunserver.ts
Comment thread packages/nextjs/src/edge/index.ts Outdated
Comment thread packages/astro/test/server/middleware.test.ts
@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch 2 times, most recently from 865560a to 9b5e334 Compare August 26, 2026 08:06
@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch from 9b5e334 to 330935b Compare August 26, 2026 08:11
@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch 2 times, most recently from 2d61e3b to b37ecb0 Compare August 26, 2026 09:28
@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch from b37ecb0 to 30260d0 Compare August 26, 2026 10:10
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread packages/remix/src/server/instrumentServer.ts
@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch from 30260d0 to 051df94 Compare August 26, 2026 12:22
@chargome

Copy link
Copy Markdown
Member Author

bugbot run 📿

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 051df94. Configure here.

@chargome
chargome marked this pull request as ready for review August 26, 2026 13:51
@chargome
chargome requested review from a team as code owners August 26, 2026 13:51
@chargome
chargome removed the request for review from a team August 26, 2026 13:51
@chargome
chargome requested review from a team, Lms24, andreiborza, isaacs, mydea, nicohrubec and s1gr1d and removed request for a team August 26, 2026 13:51

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

I think this shows that we'll loose quite a few span names to just the method but unfortunately, that's the consequence of the low card. requirement. So this is fine for now. If we find specific areas where we could do a better job at span names we can revisit later and improve them step by step.

Comment thread packages/nextjs/src/edge/index.ts Outdated
Comment thread packages/nextjs/src/server/handleOnSpanStart.ts Outdated
Applies the same span-streaming gate to the runtime and framework SDKs so no integration keeps a raw
URL in an http.server span name. Requests that resolve to a route are unchanged.

Three sites differ from the rest and are worth a closer look: remix reads its own span name back,
sveltekit also renames SvelteKit's native root span, and nextjs renames in a `spanStart` hook because
Next.js — not the SDK — creates that span.

Refs #23527
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chargome
chargome force-pushed the charlygomez/js-3412-http-span-names-frameworks branch from 051df94 to 9b9852f Compare August 26, 2026 15:00
Comment thread packages/remix/src/server/instrumentServer.ts
@chargome
chargome merged commit ec24672 into develop Aug 26, 2026
296 of 326 checks passed
@chargome
chargome deleted the charlygomez/js-3412-http-span-names-frameworks branch August 26, 2026 15:28
chargome added a commit that referenced this pull request Aug 26, 2026
)

Adds the `http.server` row to the v11 span name section and calls out
that `tracesSampler` and `ignoreSpans` can no longer match on span name
— they run at span start, before a route exists, so name-based rules
stop matching silently. Stacked on #23597.
Fixes #23527

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.

2 participants