Automatic Instrumentation
When performance is enable through tracesSampleRate, enableTracing or a tracesSampler function, the Sentry SDK will automatically capture spans for the following:
- Fastify routes & middlewares
- HTTP requests made with
http,httpsandfetch - DB queries made with:
mysqlmysql2pggraphql(including Apollo Server)mongomongooseprisma
All of these are automatically set up for you without any further configuration. The only exception is Prisma, which you have to opt-in for:
Copied
const Sentry = require("@sentry/node");
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
tracesSampleRate: 1.0,
integrations: [Sentry.prismaIntegration()],
});
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").