feat: Set url.template on pageload and navigation spans across framework SDKs#21953
feat: Set url.template on pageload and navigation spans across framework SDKs#21953Lms24 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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.
| if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') { | ||
| span.updateName(route); | ||
| span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route'); | ||
| span.setAttribute('url.template', route); |
There was a problem hiding this comment.
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.
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); | ||
| } |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 02659b6. Configure here.
size-limit report 📦
|
chargome
left a comment
There was a problem hiding this comment.
LGTM, but should we assert in tests?
yup absolutely, sorry for pinging you before this was ready. Clanker opened without draft. |
5500d3b to
945194a
Compare
9152b09 to
a5997a6
Compare
088a93e to
7c4bfcb
Compare
b40658d to
7ea373e
Compare
d20b04f to
c20fc4a
Compare
7ea373e to
882142c
Compare
c20fc4a to
41cc9bd
Compare
14cbb12 to
cae6c25
Compare
ed08f20 to
d792a0e
Compare
9afa5d7 to
26d8b46
Compare
… 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>
26d8b46 to
d7ce684
Compare
d792a0e to
66cf987
Compare


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