fix(deno,cloudflare): Prioritize name from params over name from options#18800
Merged
fix(deno,cloudflare): Prioritize name from params over name from options#18800
Conversation
Lms24
approved these changes
Jan 13, 2026
Comment on lines
30
to
+31
| ...options, | ||
| name, |
Member
There was a problem hiding this comment.
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 (?)
Member
Author
There was a problem hiding this comment.
This is what's supposedly happening
Yes, exactly. Usually the name is not set in the options - except in this case.
andreiborza
approved these changes
Jan 14, 2026
Member
andreiborza
left a comment
There was a problem hiding this comment.
Nice find also nice that the integration works on cloudflare!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):Express / Node (prefix is there):
Within the
@prisma/instrumentation, which is used for our integration, the name is added properly, but theoptionsare not updated on purpose, as the source of truth is thenameitself - OTel also uses the name directly: https://github.com/open-telemetry/opentelemetry-js/blob/87a0b455e5f7f36d9b05b41b6bf11d114dcc854c/packages/opentelemetry-sdk-trace-base/src/Tracer.ts#L149There is no further explanation in #16714 why the
namecame before the spreadingoptions.With this PR the Prisma integration does work correctly:
Since the same code was copied over to Deno, I also fixed it there.