Skip to content

Add Support for Prisma ORM #3143

Closed
Closed
@JonathanCallewaert

Description

@JonathanCallewaert

Package + Version

  • [ x ] @sentry/integrations - ^5.27.3
  • [ x ] @sentry/node - ^5.27.3
  • [ x ] @sentry/tracing - ^5.29.2

Description

I want to use the Postgres Tracing Integrations mentioned in these docs: https://docs.sentry.io/platforms/node/performance/database/
But for some reason, it does not work.
I'm using Prisma to do my Postgres queries: https://github.com/prisma/prisma
Underlying, Prisma is using the pg client package: https://github.com/prisma/prisma/blob/master/src/packages/client/src/utils/setupPostgres.ts

My code looks like this:

 Sentry.init({
      dsn: '***',
      environment: env,
      integrations: [
        new ExtraErrorData({ depth: 20 }),
        app && new Sentry.Integrations.Http({ tracing: true }),
        app && new Tracing.Integrations.Express({ app }),
        // Only works with pg client. Wait on support for Prisma
        app && new Tracing.Integrations.Postgres(),
      ].filter(Boolean),
      tracesSampleRate: 1.0,
      normalizeDepth: 21,
    });

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions