Skip to content

fix(browser): Ensure url.full and http.url attributes have the same values on http.client spans - #21660

Merged
Lms24 merged 4 commits into
developfrom
lms/fix-browser-fetch-url.full-vs-http.url
Jun 22, 2026
Merged

fix(browser): Ensure url.full and http.url attributes have the same values on http.client spans#21660
Lms24 merged 4 commits into
developfrom
lms/fix-browser-fetch-url.full-vs-http.url

Conversation

@Lms24

@Lms24Lms24 commented Jun 19, 2026

Copy link
Copy Markdown
Member

#21639 came from a bug where our browser fetch instrumentation didn't explicitly set url.full causing it to be set by the httpContextIntegration which writes this attribute onto segment spans (but the value in said case is from window.location). If streaming is enabled, http.client spans can become segment spans if they happen outside of an ongoing segment span, causing the previous mismatch.

I'll deprecate http.url in a follow-up PR. We should remove this in v11 in favour of url.full.

closes#21639

@Lms24Lms24 self-assigned this Jun 19, 2026
@github-actions

github-actionsBot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.47 kB+0.1%+25 B 🔺
@sentry/browser - with treeshaking flags25.91 kB+0.12%+30 B 🔺
@sentry/browser (incl. Tracing)45.96 kB+0.06%+26 B 🔺
@sentry/browser (incl. Tracing + Span Streaming)47.72 kB+0.06%+25 B 🔺
@sentry/browser (incl. Tracing, Profiling)50.76 kB+0.06%+26 B 🔺
@sentry/browser (incl. Tracing, Replay)85.17 kB+0.05%+39 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags74.77 kB+0.06%+41 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas)89.87 kB+0.04%+34 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback)102.53 kB+0.04%+38 B 🔺
@sentry/browser (incl. Feedback)44.66 kB+0.08%+34 B 🔺
@sentry/browser (incl. sendFeedback)32.26 kB+0.06%+18 B 🔺
@sentry/browser (incl. FeedbackAsync)37.4 kB+0.05%+18 B 🔺
@sentry/browser (incl. Metrics)28.54 kB+0.07%+19 B 🔺
@sentry/browser (incl. Logs)28.78 kB+0.07%+20 B 🔺
@sentry/browser (incl. Metrics & Logs)29.47 kB+0.07%+20 B 🔺
@sentry/react29.27 kB+0.1%+27 B 🔺
@sentry/react (incl. Tracing)48.28 kB+0.09%+40 B 🔺
@sentry/vue32.62 kB+0.05%+16 B 🔺
@sentry/vue (incl. Tracing)47.83 kB+0.07%+30 B 🔺
@sentry/svelte27.5 kB+0.09%+22 B 🔺
CDN Bundle29.86 kB+0.09%+24 B 🔺
CDN Bundle (incl. Tracing)47.88 kB+0.07%+29 B 🔺
CDN Bundle (incl. Logs, Metrics)31.42 kB+0.08%+23 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics)49.22 kB+0.06%+28 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics)70.72 kB+0.03%+21 B 🔺
CDN Bundle (incl. Tracing, Replay)85.24 kB+0.04%+29 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)86.51 kB+0.04%+31 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback)91.08 kB+0.04%+29 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.34 kB+0.04%+29 B 🔺
CDN Bundle - uncompressed88.84 kB+0.05%+44 B 🔺
CDN Bundle (incl. Tracing) - uncompressed144.91 kB+0.06%+78 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed93.55 kB+0.05%+44 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed148.89 kB+0.06%+78 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed218.37 kB+0.03%+44 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed263.78 kB+0.03%+78 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed267.74 kB+0.03%+78 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed277.48 kB+0.03%+78 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed281.43 kB+0.03%+78 B 🔺
@sentry/nextjs (client)50.67 kB+0.08%+40 B 🔺
@sentry/sveltekit (client)46.37 kB+0.07%+32 B 🔺
@sentry/core/server76.3 kB--
@sentry/core/browser63.45 kB--
@sentry/node-core61.63 kB+0.01%+3 B 🔺
@sentry/node123.61 kB--
@sentry/node/import (ESM hook with diagnostics-channel injection)69.95 kB--
@sentry/node/light50.55 kB-0.01%-2 B 🔽
@sentry/node - without tracing73.69 kB--
@sentry/aws-serverless84.89 kB--
@sentry/cloudflare (withSentry) - minified175.71 kB--
@sentry/cloudflare (withSentry)437.84 kB--

View base workflow run

@Lms24
Lms24 marked this pull request as ready for review June 22, 2026 09:02
@Lms24
Lms24 requested a review from a team as a code ownerJune 22, 2026 09:02
@Lms24
Lms24 requested review from logaretm and mydea and removed request for a teamJune 22, 2026 09:02
Comment threadpackages/browser/src/tracing/request.ts

@cursorcursorBot 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 dea8ef8. Configure here.

Comment threadpackages/browser/src/integrations/httpcontext.ts
@Lms24
Lms24 requested a review from cleptricJune 22, 2026 12:15
@Lms24
Lms24 merged commit b953c6f into developJun 22, 2026
555 of 557 checks passed
@Lms24
Lms24 deleted the lms/fix-browser-fetch-url.full-vs-http.url branch June 22, 2026 16:58
Sign up for freeto 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.

Streamed http.client spans have different url.full and http.url attribute values

2 participants

@Lms24@andreiborza