Skip to content

Add Support for Prisma ORM #3143

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,
    });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions