Add Support for Drizzle ORM #8117
Closed
smeubank
started this conversation in
Features / New SDKs (Integrations) / Ideas
Replies: 6 comments 4 replies
|
Any updates?? |
1 reply
|
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()
); |
0 replies
|
Hey folks! If you upgrade to https://docs.sentry.io/platforms/javascript/guides/node/migration/v7-to-v8/ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



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
All reactions