Add Support for Drizzle ORM #8117
Replies: 6 comments 4 replies
-
Any updates?? |
Beta Was this translation helpful? Give feedback.
-
I'm manually instrumenting my Drizzle ORM queries like so: // Define drizzle query, but don't invoke .get() right away
const updateQuery = db
.update(likes)
.set({ likes: (entry.likes ?? 0) + 1 })
.where(eq(likes.slug, slug))
.returning();
const updated = Sentry.startSpan(
{
// the span operation must be a valid one
op: "db.query",
// invoke the .toSQL().sql on the query to get the raw SQL string and set it as the span name
name: updateQuery.toSQL().sql,
// also make sure to add the db.system data property!
data: { "db.system": "sqlite" },
// these properties are important if you want to utilize Queries Performance
// read more: https://docs.sentry.io/product/performance/queries/#span-eligibility
},
() => updateQuery.get(), // invoke the .get()
); |
Beta Was this translation helpful? Give feedback.
-
@mydea Do we get any added value in support for Drizzle with v8 and OTel? cc @jas-kas |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hey folks! If you upgrade to https://docs.sentry.io/platforms/javascript/guides/node/migration/v7-to-v8/ |
Beta Was this translation helpful? Give feedback.
-
![]() |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
Add an integration to support Drizzle ORM
Solution Brainstorm
Similar to what was delivered to Prisma ORM
https://npmtrends.com/drizzle-orm-vs-prisma
Beta Was this translation helpful? Give feedback.
All reactions