Conversation
…as escape hatch for all Prisma versions
added 3 commits
January 22, 2025 11:23
chargome
approved these changes
Jan 22, 2025
|
|
||
| // Make sure we use the query text as the span name, for ex. SELECT * FROM "User" WHERE "id" = $1 | ||
| if (spanJSON.description === 'prisma:engine:db_query' && spanJSON.data['db.query.text']) { | ||
| span.updateName(spanJSON.data['db.query.text'] as string); |
Member
There was a problem hiding this comment.
Wouldn't it actually be more consistent if we were to leave this as prisma:engine:db_query or maybe make this opt-in?
Contributor
Author
There was a problem hiding this comment.
I think that would clash with our contract with Sentry but I'll let @AbhiPrasad confirm.
Contributor
There was a problem hiding this comment.
this is done to make the queries module work, as the queries module expects the query as the span name in it's current state.
eventually this won't be required once we have proper OTEL support (with all the attributes), but given the timeline for that is not super clear, we have to do this for now.
chargome
reviewed
Jan 22, 2025
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.
Ref #14793
Adds a compatibility layer to the
prismaIntegrationvia theprismaInstrumentationoption that can be used to pass a prisma instrumentation instance of older Prisma versions.