fix(deno,cloudflare): Prioritize name from params over name from options #18800
+119
−4
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.