Skip to content

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

Draft
Lms24 wants to merge 3 commits into
feat/pageload-url-attrs-angularfrom
feat/pageload-url-attrs-frameworks
Draft

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

Conversation

@Lms24

@Lms24 Lms24 commented Jul 3, 2026

Copy link
Copy Markdown
Member

WIP, most of this will be broken down into individual PRs

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.32 kB +0.17% +74 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.12 kB +0.22% +102 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.08 kB +0.14% +71 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.57 kB +0.1% +80 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.19 kB +0.12% +89 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 90.27 kB +0.1% +85 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 102.92 kB +0.08% +77 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.59 kB +0.17% +82 B 🔺
@sentry/vue 33.03 kB - -
@sentry/vue (incl. Tracing) 48.23 kB +0.26% +124 B 🔺
@sentry/svelte 27.61 kB - -
CDN Bundle 30 kB - -
CDN Bundle (incl. Tracing) 48.32 kB +0.17% +79 B 🔺
CDN Bundle (incl. Logs, Metrics) 31.57 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.63 kB +0.19% +92 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.77 kB - -
CDN Bundle (incl. Tracing, Replay) 85.76 kB +0.07% +59 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.07 kB +0.09% +70 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 91.58 kB +0.09% +82 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.84 kB +0.08% +66 B 🔺
CDN Bundle - uncompressed 89.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.09 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.59 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.11 kB +0.06% +135 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.07 kB +0.06% +135 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 278.81 kB +0.05% +135 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 282.76 kB +0.05% +135 B 🔺
@sentry/nextjs (client) 51.08 kB +0.28% +138 B 🔺
@sentry/sveltekit (client) 46.75 kB +0.22% +100 B 🔺
@sentry/core/server 78.38 kB - -
@sentry/core/browser 64.73 kB - -
@sentry/node-core 63.2 kB -0.03% -15 B 🔽
@sentry/node 123.2 kB -0.46% -565 B 🔽
⛔️ @sentry/node (incl. diagnostics channel injection) (max: null) 0 B removed removed
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.72 kB - -
@sentry/node - without tracing 74.24 kB -0.77% -575 B 🔽
@sentry/aws-serverless 85.02 kB -0.68% -575 B 🔽
@sentry/cloudflare (withSentry) - minified 181.68 kB - -
@sentry/cloudflare (withSentry) 449.39 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 from 9afa5d7 to 26d8b46 Compare July 6, 2026 13:25
Lms24 and others added 2 commits July 6, 2026 15:46
… SDKs

Apply url.template to pageload and navigation root spans across Astro,
Next.js, React, React Router, Remix, Solid, SvelteKit, and Vue
integrations.

Co-Authored-By: Cursor <cursoragent@cursor.com>
@Lms24 Lms24 force-pushed the feat/pageload-url-attrs-angular branch 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
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