Uh oh!
There was an error while loading. Please reload this page.
feat: Add url.full and url.path attributes to http.server spans - #22496
Conversation
Uh oh!
There was an error while loading. Please reload this page.
4d1b793 to
0f05feaCompareThere was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0f05fea. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
Assert url.full and url.path across HTTP server tests so expectations match the new span attributes. Use normalized Next.js request data when constructing absolute URL attributes. Co-Authored-By: GPT-5.6 Sol <cursoragent@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
| attributes: { | ||
| [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route', | ||
| [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.nextjs', | ||
| [URL_FULL]: 'https://dogs.are.great/api/dogs?good=true', |
There was a problem hiding this comment.
q: Do we care about Pii here or would this be filtered in Relay?
There was a problem hiding this comment.
the attribute gets auto-scrubbed: https://getsentry.github.io/sentry-conventions/attributes/url/#url-full
As for, if we should record it in the first place, I don't know tbh. We can ask. I'll merge this for now because if this needs to be gated, we'll need to guard this attribute in a lot of places besides this PR as well.
Uh oh!
There was an error while loading. Please reload this page.
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>
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>
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>
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](<https://cursor.com>) --------- Co-authored-by: GPT-5.6 Sol <cursoragent@cursor.com>

First part of #22417:
This PR adds the
url.fullandurl.pathattributes to all instrumentation that starts or takes overhttp.serverspans. 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.routeattributes which should only be set on spans when we have a parameterized route.ref #22417