Automatic Instrumentation
Learn what transactions are captured after tracing is enabled.
When performance is enabled through tracesSampleRate
, enableTracing
or a tracesSampler
function, the Sentry SDK will automatically capture spans for incoming requests, and HTTP requests made with:
http
https
fetch
Database instrumentation can be manually enabled by adding the corresponding integrations to the integrations
array in the init
method. The following packages are supported:
mysql
mysql2
pg
graphql
(including Apollo Server)mongo
mongoose
ioredis
prisma
(requires additional configuration - see Prisma Integration)
You can add the integrations as follows:
Copied
const Sentry = require("@sentry/aws-serverless");
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
tracesSampleRate: 1.0,
integrations: [
Sentry.mysqlIntegration(),
Sentry.mysql2Integration(),
Sentry.pgIntegration(),
Sentry.graphqlIntegration(),
Sentry.mongoIntegration(),
Sentry.mongooseIntegration(),
Sentry.ioredisIntegration(),
],
});
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").