Skip to content

feat: Add http.route attribute to http.server spans with parameterized routes#22534

Merged
Lms24 merged 8 commits into
developfrom
lms/feat-add-http-route-attribute
Jul 23, 2026
Merged

feat: Add http.route attribute to http.server spans with parameterized routes#22534
Lms24 merged 8 commits into
developfrom
lms/feat-add-http-route-attribute

Conversation

@Lms24

@Lms24 Lms24 commented Jul 23, 2026

Copy link
Copy Markdown
Member

Adds the http.route attribute that was missing on a few http.server spans when we found a parameterized route. Mostly this concerned http.server spans we emit manually from frameworks (as opposed to Node http integration) or spans we enhance from OTel-based framework telemetry (Next/Sveltekit).

I decided against also adding url.template, since this attribute is more used on the client-side. Will open a PR in conventions to disambiguate these attributes.

For the node:http spans, we already set the attribute in the higher level integrations (express, koa, etc), so there was nothing to add there.

closes #22417

Comment thread packages/hono/src/shared/middlewareHandlers.ts
Comment thread packages/hono/src/shared/middlewareHandlers.ts
@Lms24 Lms24 self-assigned this Jul 23, 2026
@Lms24
Lms24 marked this pull request as ready for review July 23, 2026 11:52
@Lms24
Lms24 requested a review from a team as a code owner July 23, 2026 11:52
@Lms24
Lms24 requested review from chargome and nicohrubec and removed request for a team July 23, 2026 11:52
Comment thread packages/remix/src/server/instrumentServer.ts
Comment thread packages/hono/package.json Outdated
Comment thread packages/nextjs/src/server/enhanceHandleRequestRootSpan.ts
Comment thread packages/sveltekit/src/server-common/handle.ts
Comment thread packages/nextjs/src/server/enhanceHandleRequestRootSpan.ts
Comment thread packages/nextjs/src/server/enhanceHandleRequestRootSpan.ts
Comment thread packages/remix/src/server/instrumentServer.ts
Comment thread packages/nextjs/src/server/enhanceHandleRequestRootSpan.ts
@Lms24
Lms24 force-pushed the lms/feat-add-http-route-attribute branch from 85949f1 to ae9c5fa Compare July 23, 2026 13:43

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

Comment thread packages/nextjs/src/edge/wrapApiHandlerWithSentry.ts Outdated
@Lms24
Lms24 enabled auto-merge (squash) July 23, 2026 16:28
@Lms24
Lms24 merged commit 7f55ee8 into develop Jul 23, 2026
108 checks passed
@Lms24
Lms24 deleted the lms/feat-add-http-route-attribute branch July 23, 2026 16:40
Lms24 added a commit that referenced this pull request Jul 23, 2026
…ameterized routes (#22564)

Backport of: #22534

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Ensure SDKs emit url and route attributes on http.server spans

2 participants