Skip to content

feat(v10): Add url.full and url.path to http.server spans#22533

Merged
Lms24 merged 4 commits into
v10from
backport/22496-v10
Jul 23, 2026
Merged

feat(v10): Add url.full and url.path to http.server spans#22533
Lms24 merged 4 commits into
v10from
backport/22496-v10

Conversation

@Lms24

@Lms24 Lms24 commented Jul 23, 2026

Copy link
Copy Markdown
Member

Backports #22496 to v10.

Add url.full and url.path to instrumentation that creates or takes over http.server spans so streamed spans can infer useful descriptions consistently on v10.

The Node-side change follows the v10 node-core package split; the remaining changes are a direct cherry-pick of the merged PR.

Fixes #22417

Made with Cursor

…#22496)

First part of
#22417:

This PR adds the `url.full` and `url.path` attributes to all
instrumentation that starts or takes over `http.server` spans. To ensure
we get a good span description inferred for streamed spans, we need to
add the respective attributes to these spans.

In a second PR, I'll add `url.template`/`http.route` attributes which
should only be set on spans when we have a parameterized route.

ref #22417

---------

Co-authored-by: GPT-5.6 Sol <cursoragent@cursor.com>
Comment thread packages/remix/src/server/instrumentServer.ts
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB added added
@sentry/browser - with treeshaking flags 26.2 kB added added
@sentry/browser (incl. Tracing) 46.6 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.39 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.36 kB added added
@sentry/browser (incl. Tracing, Replay) 85.85 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.48 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.21 kB added added
@sentry/browser (incl. Feedback) 44.93 kB added added
@sentry/browser (incl. sendFeedback) 32.55 kB added added
@sentry/browser (incl. FeedbackAsync) 37.69 kB added added
@sentry/browser (incl. Metrics) 28.85 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.77 kB added added
@sentry/react 29.56 kB added added
@sentry/react (incl. Tracing) 48.87 kB added added
@sentry/vue 33.19 kB added added
@sentry/vue (incl. Tracing) 48.56 kB added added
@sentry/svelte 27.79 kB added added
CDN Bundle 30.16 kB added added
CDN Bundle (incl. Tracing) 48.56 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71 kB added added
CDN Bundle (incl. Tracing, Replay) 86.06 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.37 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.13 kB added added
CDN Bundle - uncompressed 89.91 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.79 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.62 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.77 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.38 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.99 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.73 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.68 kB added added
@sentry/nextjs (client) 51.41 kB added added
@sentry/sveltekit (client) 47.02 kB added added
@sentry/core/server 80.33 kB added added
@sentry/core/browser 66.72 kB added added
@sentry/node-core 63.26 kB added added
@sentry/node 125.85 kB added added
@sentry/node (incl. diagnostics channel injection) 151.31 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node/light 51.42 kB added added
@sentry/node - without tracing 74.95 kB added added
@sentry/aws-serverless 84.22 kB added added
@sentry/cloudflare (withSentry) - minified 197.74 kB added added
@sentry/cloudflare (withSentry) 486.69 kB added added

Keep the exact Connect server span assertion aligned with the URL attributes
added by the v10 backport.

Refs #22496
Co-Authored-By: GPT-5.6 Sol <cursoragent@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/core/src/integrations/http/server-subscription.ts
@Lms24
Lms24 marked this pull request as ready for review July 23, 2026 11:07
@Lms24
Lms24 requested review from a team as code owners July 23, 2026 11:07
@Lms24
Lms24 requested review from JPeer264, chargome, isaacs and nicohrubec and removed request for a team July 23, 2026 11:07
Comment thread packages/elysia/src/withElysia.ts
Only record `url.full` when the incoming request resolves to an absolute URL,
while retaining `url.path` for relative requests without a host.

Refs #22496
Co-Authored-By: GPT-5.6 Sol <cursoragent@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/remix/src/server/instrumentServer.ts
Align Node server spans with the URL attribute contract by retaining
`url.path` but omitting `url.full` when only a relative request URL exists.

Refs #22496
Co-Authored-By: GPT-5.6 Sol <cursoragent@cursor.com>

Co-authored-by: Cursor <cursoragent@cursor.com>

@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 3b3b0dc. Configure here.

[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD]: method,
// This is here for backwards compatibility, we used to set this here before
method,
[URL_FULL]: ctx.url.href,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Astro take-over omits URL attributes

Medium Severity

enhanceHttpServerSpan takes over an existing http.server span but never sets url.full or url.path, while the create path in the same file does. Sibling take-over paths in this PR (SvelteKit, Next.js edge, React Router) set these with a fallback from the request URL. When the prior span lacks them (relative URL, custom instrumentation), Astro streamed spans cannot infer descriptions.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3b3b0dc. Configure here.

@Lms24
Lms24 merged commit a540764 into v10 Jul 23, 2026
307 of 308 checks passed
@Lms24
Lms24 deleted the backport/22496-v10 branch July 23, 2026 13:12
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