ntegral / nestjs-sentry

Provides an injectable sentry.io client to provide enterprise logging nestjs modules
ISC License
380 stars 96 forks source link

Integrate Sentry Prisma ORM #98

Open nickbullll opened 2 years ago

nickbullll commented 2 years ago

Hey, any idea how can I integrate Prisma ORM? Official setup from Sentry doesn't work.

import { PrismaClient } from '@prisma/client';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';

const client = new PrismaClient();

Sentry.init({
  dsn: key,
  release: '1.0',
  tracesSampleRate: 1.0,
  integrations: [new Tracing.Integrations.Prisma({ client })],
});

https://docs.sentry.io/platforms/node/performance/database/opt-in/

ahmadalfy commented 1 year ago

When I integrated that using the plugin, the application stop responding. I had to remove that and integrate Sentry manually using a nest exception filter.

tastafur commented 9 months ago

For this, prism would have to be integrated with the instance, already created of prism in nestjs, I tried for a while and couldn't get it, trying to put it in the library