UNPKG

@sentry/node

Version:

Sentry Node SDK using OpenTelemetry for performance instrumentation

70 lines (65 loc) • 2.33 kB
Object.defineProperty(exports, '__esModule', { value: true }); const http = require('../http.js'); const connect = require('./connect.js'); const express = require('./express.js'); const fastify = require('./fastify.js'); const graphql = require('./graphql.js'); const index = require('./hapi/index.js'); const koa = require('./koa.js'); const mongo = require('./mongo.js'); const mongoose = require('./mongoose.js'); const mysql = require('./mysql.js'); const mysql2 = require('./mysql2.js'); const nest = require('./nest/nest.js'); const postgres = require('./postgres.js'); const redis = require('./redis.js'); /** * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required. */ function getAutoPerformanceIntegrations() { return [ express.expressIntegration(), fastify.fastifyIntegration(), graphql.graphqlIntegration(), mongo.mongoIntegration(), mongoose.mongooseIntegration(), mysql.mysqlIntegration(), mysql2.mysql2Integration(), redis.redisIntegration(), postgres.postgresIntegration(), // For now, we do not include prisma by default because it has ESM issues // See https://github.com/prisma/prisma/issues/23410 // TODO v8: Figure out a better solution for this, maybe only disable in ESM mode? // prismaIntegration(), nest.nestIntegration(), index.hapiIntegration(), koa.koaIntegration(), connect.connectIntegration(), ]; } /** * Get a list of methods to instrument OTEL, when preload instrumentation. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function getOpenTelemetryInstrumentationToPreload() { return [ http.instrumentHttp, express.instrumentExpress, connect.instrumentConnect, fastify.instrumentFastify, index.instrumentHapi, koa.instrumentKoa, nest.instrumentNest, mongo.instrumentMongo, mongoose.instrumentMongoose, mysql.instrumentMysql, mysql2.instrumentMysql2, postgres.instrumentPostgres, index.instrumentHapi, graphql.instrumentGraphql, redis.instrumentRedis, ]; } exports.getAutoPerformanceIntegrations = getAutoPerformanceIntegrations; exports.getOpenTelemetryInstrumentationToPreload = getOpenTelemetryInstrumentationToPreload; //# sourceMappingURL=index.js.map