Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/node/src/integrations/tracing/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export const prismaIntegration = defineIntegration((options?: PrismaOptions) =>
}

// 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']) {
if ((spanJSON.description === 'prisma:engine:db_query' || spanJSON.description === 'prisma:client:db_query') && spanJSON.data['db.query.text']) {
Copy link

Choose a reason for hiding this comment

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

Fix PR lacks test verifying the regression fix

Medium Severity

This fix PR does not include a test that verifies the regression is actually fixed. The existing v7 integration test at prisma-orm-v7/test.ts expects description === 'prisma:client:db_query' (the unfixed behavior), meaning it either doesn't cover this fix at all, or the fix is ineffective because db.query.text isn't available at spanStart time for v7. Compare with the v6 test, which properly asserts the description is updated to the actual SQL query text. A test confirming the span description gets updated for prisma:client:db_query spans is needed.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

span.updateName(spanJSON.data['db.query.text'] as string);
}

Expand Down
Loading