Skip to content

Conversation

@JPeer264
Copy link
Member

I was playing around with #15466 and saw that the span names for the Prisma integration are different than the ones with actual OTel support, such as @sentry/node.

Cloudflare (no prisma:client: prefix):

Screenshot 2026-01-13 at 15 48 41

Express / Node (prefix is there):

Screenshot 2026-01-13 at 17 18 05

Within the @prisma/instrumentation, which is used for our integration, the name is added properly, but the options are not updated on purpose, as the source of truth is the name itself - OTel also uses the name directly: https://github.com/open-telemetry/opentelemetry-js/blob/87a0b455e5f7f36d9b05b41b6bf11d114dcc854c/packages/opentelemetry-sdk-trace-base/src/Tracer.ts#L149

There is no further explanation in #16714 why the name came before the spreading options.


With this PR the Prisma integration does work correctly:

Screenshot 2026-01-13 at 17 23 06

Since the same code was copied over to Deno, I also fixed it there.

Comment on lines 30 to +31
...options,
name,
Copy link
Member

@Lms24 Lms24 Jan 13, 2026

Choose a reason for hiding this comment

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

hmm it's interesting that options overwrote the name because the SpanOptions type doesn't include name AFAICT. Is Prisma instrumentation incorrectly using the OTel API?
Ahh should have read the PR description more carefully. This is what's supposedly happening (?)

Copy link
Member Author

Choose a reason for hiding this comment

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

This is what's supposedly happening

Yes, exactly. Usually the name is not set in the options - except in this case.

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

Nice find also nice that the integration works on cloudflare!

@JPeer264 JPeer264 merged commit 6903407 into develop Jan 14, 2026
52 checks passed
@JPeer264 JPeer264 deleted the jp/name-has-priority branch January 14, 2026 08:57
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.

4 participants