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 the following:
- HTTP requests made with:
http
https
fetch
These are automatically set up for you without any further configuration.
The following instrumentation can be manually enabled by adding the corresponding integration to the integrations
array in the init
method:
- DB queries made with:
mysql
mysql2
pg
graphql
(including Apollo Server)mongo
mongoose
ioredis
prisma
You can add these as follows:
Copied
const Sentry = require('@sentry/aws-serverless');
Sentry.init({
dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
tracesSampleRate: 1.0,
integrations: [
Sentry.prismaIntegration(),
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").