Skip to content

feat: Set url.template on pageload and navigation spans across framework SDKs#21953

Closed
Lms24 wants to merge 2 commits into
feat/pageload-url-attrs-reactfrom
feat/pageload-url-attrs-frameworks
Closed

feat: Set url.template on pageload and navigation spans across framework SDKs#21953
Lms24 wants to merge 2 commits into
feat/pageload-url-attrs-reactfrom
feat/pageload-url-attrs-frameworks

Conversation

@Lms24

@Lms24 Lms24 commented Jul 3, 2026

Copy link
Copy Markdown
Member

Applies url.template to pageload and navigation root spans for Angular and Solid router integrations, refactors Angular routing to use the shared getAbsoluteUrl helper introduced in #22006, and adds the navigation.type attribute to SvelteKit navigation spans.

part of #21921

@Lms24 Lms24 requested a review from a team as a code owner July 3, 2026 10:08
@Lms24 Lms24 requested review from chargome, mydea and nicohrubec and removed request for a team July 3, 2026 10:08

@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 2 potential issues.

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 02659b6. Configure here.

Comment thread packages/angular/src/tracing.ts Outdated
if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {
span.updateName(route);
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
span.setAttribute('url.template', route);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing tests for url.template

Medium Severity

This feat PR adds url.template on pageload and navigation spans across many framework SDKs, but the diff includes no unit, integration, or E2E tests asserting that attribute on sent spans. Per PR review guidelines for feat changes, at least one such test is expected.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 02659b6. Configure here.

activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
if (source === 'route') {
activeRootSpan.setAttribute('url.template', name);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale url template on downgrade

Medium Severity

When a pageload or navigation span’s sentry.source is later set to url, the new code often stops writing url.template but never removes an earlier value. The span can then show url source while still carrying a previous route template, which mislabels transactions in Sentry.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 02659b6. Configure here.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.59 kB - -
@sentry/browser - with treeshaking flags 26.03 kB - -
@sentry/browser (incl. Tracing) 46.34 kB +0.16% +70 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.13 kB +0.22% +104 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.12 kB +0.18% +87 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.61 kB +0.07% +56 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.26 kB +0.12% +83 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 90.32 kB +0.07% +60 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 102.97 kB +0.06% +55 B 🔺
@sentry/browser (incl. Feedback) 44.76 kB - -
@sentry/browser (incl. sendFeedback) 32.38 kB - -
@sentry/browser (incl. FeedbackAsync) 37.51 kB - -
@sentry/browser (incl. Metrics) 28.67 kB - -
@sentry/browser (incl. Logs) 28.91 kB - -
@sentry/browser (incl. Metrics & Logs) 29.59 kB - -
@sentry/react 29.38 kB - -
@sentry/react (incl. Tracing) 48.61 kB +0.17% +81 B 🔺
@sentry/vue 33.03 kB - -
@sentry/vue (incl. Tracing) 48.3 kB +0.3% +141 B 🔺
@sentry/svelte 27.61 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 48.32 kB +0.17% +78 B 🔺
CDN Bundle (incl. Logs, Metrics) 31.57 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.64 kB +0.2% +97 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.81 kB - -
CDN Bundle (incl. Tracing, Replay) 85.84 kB +0.12% +96 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.14 kB +0.1% +83 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 91.64 kB +0.1% +86 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.92 kB +0.09% +82 B 🔺
CDN Bundle - uncompressed 89.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.1 kB +0.1% +135 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.05 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.07 kB +0.1% +135 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.75 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.27 kB +0.06% +135 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.23 kB +0.06% +135 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.97 kB +0.05% +135 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.92 kB +0.05% +135 B 🔺
@sentry/nextjs (client) 51.1 kB +0.32% +159 B 🔺
@sentry/sveltekit (client) 46.79 kB +0.24% +112 B 🔺
@sentry/core/server 78.42 kB - -
@sentry/core/browser 64.74 kB - -
@sentry/node-core 62.72 kB +0.01% +1 B 🔺
@sentry/node 124.6 kB - -
@sentry/node (incl. diagnostics channel injection) 132.88 kB -0.85% -1.14 kB 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.72 kB -0.01% -1 B 🔽
@sentry/node - without tracing 74.05 kB - -
@sentry/aws-serverless 85.5 kB - -
@sentry/cloudflare (withSentry) - minified 181.69 kB - -
@sentry/cloudflare (withSentry) 449.12 kB - -

View base workflow run

@chargome chargome 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, but should we assert in tests?

@Lms24 Lms24 marked this pull request as draft July 3, 2026 10:32
@Lms24

Lms24 commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

LGTM, but should we assert in tests?

yup absolutely, sorry for pinging you before this was ready. Clanker opened without draft.

@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-base branch from 5500d3b to 945194a Compare July 3, 2026 11:43
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from 9152b09 to a5997a6 Compare July 3, 2026 12:38
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-base branch from 088a93e to 7c4bfcb Compare July 3, 2026 13:05
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from b40658d to 7ea373e Compare July 3, 2026 13:10
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-base branch from d20b04f to c20fc4a Compare July 6, 2026 08:20
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from 7ea373e to 882142c Compare July 6, 2026 08:20
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-base branch from c20fc4a to 41cc9bd Compare July 6, 2026 13:13
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from 14cbb12 to cae6c25 Compare July 6, 2026 13:18
@Lms24 Lms24 changed the base branch from feat/pageload-url-attrs-base to feat/pageload-url-attrs-angular July 6, 2026 13:19
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from ed08f20 to d792a0e Compare July 6, 2026 13:25
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-angular branch 2 times, most recently from 26d8b46 to d7ce684 Compare July 6, 2026 13:46
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from d792a0e to 66cf987 Compare July 6, 2026 13:46
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-angular branch from d7ce684 to 76f14ee Compare July 7, 2026 09:05
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from 4cb8c33 to 975286b Compare July 7, 2026 09:16
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from da06b4f to f26d09c Compare July 7, 2026 13:51
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-astro branch from d7cc00e to c6c9931 Compare July 7, 2026 13:51
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from f26d09c to eb2f55b Compare July 7, 2026 13:57
@Lms24 Lms24 changed the base branch from feat/pageload-url-attrs-astro to feat/pageload-url-attrs-react-router July 7, 2026 13:58
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from c1471bb to 3282635 Compare July 7, 2026 15:50
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-react-router branch from 58bf332 to 30325b3 Compare July 7, 2026 15:50
@Lms24 Lms24 changed the base branch from feat/pageload-url-attrs-react-router to feat/pageload-url-attrs-remix July 7, 2026 16:36
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from 3282635 to 67c27a5 Compare July 7, 2026 16:36
@Lms24 Lms24 changed the base branch from feat/pageload-url-attrs-remix to feat/pageload-url-attrs-sveltekit July 7, 2026 17:06
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from ac4177b to b7ae3a2 Compare July 8, 2026 07:36
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-sveltekit branch from 0be838c to 8dcf8d2 Compare July 8, 2026 07:36
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch 2 times, most recently from 624d1b6 to fb389c1 Compare July 8, 2026 09:29
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-sveltekit branch from 8dcf8d2 to 4b0a201 Compare July 8, 2026 09:29
@Lms24 Lms24 changed the base branch from feat/pageload-url-attrs-sveltekit to feat/pageload-url-attrs-vue July 8, 2026 09:30
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from fb389c1 to 3f204c3 Compare July 8, 2026 12:22
@Lms24 Lms24 changed the base branch from feat/pageload-url-attrs-vue to feat/pageload-url-attrs-react July 8, 2026 12:24
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from 3f204c3 to d5da1ca Compare July 8, 2026 12:27
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-react branch from 41fa12e to e595d12 Compare July 8, 2026 12:29
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from d5da1ca to 9aa65f1 Compare July 8, 2026 12:29
Lms24 and others added 2 commits July 8, 2026 14:49
…pans

Adds url.template, url.path, and url.full to pageload and navigation spans
for Solid Router and TanStack Solid Router, including redirect and back-button
navigation cases. Updates solidstart and solid-tanstack-router e2e tests.

part of #21921

Co-Authored-By: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ltekit)

Refactors Angular routing to use the shared getAbsoluteUrl helper and adds
navigation.type to SvelteKit navigation spans.

part of #21921

Co-Authored-By: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-frameworks branch from 9aa65f1 to aca4884 Compare July 8, 2026 12:50
@Lms24

Lms24 commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Restructuring stack: splitting solid changes into #22090. Reopening with updated base.

@Lms24 Lms24 closed this Jul 8, 2026
@Lms24 Lms24 reopened this Jul 8, 2026
@Lms24 Lms24 closed this Jul 8, 2026
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