@sentry/node 8.0.0-rc.3 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/cron/common.js +56 -0
- package/cjs/cron/common.js.map +1 -0
- package/cjs/cron/cron.js +112 -0
- package/cjs/cron/cron.js.map +1 -0
- package/cjs/cron/index.js +15 -0
- package/cjs/cron/index.js.map +1 -0
- package/cjs/cron/node-cron.js +72 -0
- package/cjs/cron/node-cron.js.map +1 -0
- package/cjs/cron/node-schedule.js +69 -0
- package/cjs/cron/node-schedule.js.map +1 -0
- package/cjs/debug-build.js +11 -0
- package/cjs/debug-build.js.map +1 -0
- package/cjs/index.js +85 -4005
- package/cjs/index.js.map +1 -1
- package/cjs/integrations/anr/index.js +211 -0
- package/cjs/integrations/anr/index.js.map +1 -0
- package/cjs/integrations/console.js +40 -0
- package/cjs/integrations/console.js.map +1 -0
- package/cjs/integrations/context.js +435 -0
- package/cjs/integrations/context.js.map +1 -0
- package/cjs/integrations/contextlines.js +137 -0
- package/cjs/integrations/contextlines.js.map +1 -0
- package/cjs/integrations/http.js +161 -0
- package/cjs/integrations/http.js.map +1 -0
- package/cjs/integrations/local-variables/common.js +87 -0
- package/cjs/integrations/local-variables/common.js.map +1 -0
- package/cjs/integrations/local-variables/index.js +12 -0
- package/cjs/integrations/local-variables/index.js.map +1 -0
- package/cjs/integrations/local-variables/local-variables-async.js +149 -0
- package/cjs/integrations/local-variables/local-variables-async.js.map +1 -0
- package/cjs/integrations/local-variables/local-variables-sync.js +376 -0
- package/cjs/integrations/local-variables/local-variables-sync.js.map +1 -0
- package/cjs/integrations/modules.js +99 -0
- package/cjs/integrations/modules.js.map +1 -0
- package/cjs/integrations/node-fetch.js +81 -0
- package/cjs/integrations/node-fetch.js.map +1 -0
- package/cjs/integrations/onuncaughtexception.js +135 -0
- package/cjs/integrations/onuncaughtexception.js.map +1 -0
- package/cjs/integrations/onunhandledrejection.js +90 -0
- package/cjs/integrations/onunhandledrejection.js.map +1 -0
- package/cjs/integrations/spotlight.js +109 -0
- package/cjs/integrations/spotlight.js.map +1 -0
- package/cjs/integrations/tracing/connect.js +41 -0
- package/cjs/integrations/tracing/connect.js.map +1 -0
- package/cjs/integrations/tracing/express.js +127 -0
- package/cjs/integrations/tracing/express.js.map +1 -0
- package/cjs/integrations/tracing/fastify.js +84 -0
- package/cjs/integrations/tracing/fastify.js.map +1 -0
- package/cjs/integrations/tracing/graphql.js +32 -0
- package/cjs/integrations/tracing/graphql.js.map +1 -0
- package/cjs/integrations/tracing/hapi/index.js +106 -0
- package/cjs/integrations/tracing/hapi/index.js.map +1 -0
- package/cjs/integrations/tracing/index.js +43 -0
- package/cjs/integrations/tracing/index.js.map +1 -0
- package/cjs/integrations/tracing/koa.js +60 -0
- package/cjs/integrations/tracing/koa.js.map +1 -0
- package/cjs/integrations/tracing/mongo.js +31 -0
- package/cjs/integrations/tracing/mongo.js.map +1 -0
- package/cjs/integrations/tracing/mongoose.js +31 -0
- package/cjs/integrations/tracing/mongoose.js.map +1 -0
- package/cjs/integrations/tracing/mysql.js +24 -0
- package/cjs/integrations/tracing/mysql.js.map +1 -0
- package/cjs/integrations/tracing/mysql2.js +31 -0
- package/cjs/integrations/tracing/mysql2.js.map +1 -0
- package/cjs/integrations/tracing/nest.js +69 -0
- package/cjs/integrations/tracing/nest.js.map +1 -0
- package/cjs/integrations/tracing/postgres.js +32 -0
- package/cjs/integrations/tracing/postgres.js.map +1 -0
- package/cjs/integrations/tracing/prisma.js +48 -0
- package/cjs/integrations/tracing/prisma.js.map +1 -0
- package/cjs/integrations/tracing/redis.js +29 -0
- package/cjs/integrations/tracing/redis.js.map +1 -0
- package/cjs/nodeVersion.js +10 -0
- package/cjs/nodeVersion.js.map +1 -0
- package/cjs/otel/contextManager.js +16 -0
- package/cjs/otel/contextManager.js.map +1 -0
- package/cjs/proxy/base.js +127 -0
- package/cjs/proxy/base.js.map +1 -0
- package/cjs/proxy/index.js +178 -0
- package/cjs/proxy/index.js.map +1 -0
- package/cjs/proxy/parse-proxy-response.js +104 -0
- package/cjs/proxy/parse-proxy-response.js.map +1 -0
- package/cjs/sdk/api.js +45 -0
- package/cjs/sdk/api.js.map +1 -0
- package/cjs/sdk/client.js +63 -0
- package/cjs/sdk/client.js.map +1 -0
- package/cjs/sdk/init.js +318 -0
- package/cjs/sdk/init.js.map +1 -0
- package/cjs/sdk/initOtel.js +58 -0
- package/cjs/sdk/initOtel.js.map +1 -0
- package/cjs/sdk/scope.js +18 -0
- package/cjs/sdk/scope.js.map +1 -0
- package/cjs/transports/http.js +163 -0
- package/cjs/transports/http.js.map +1 -0
- package/cjs/utils/addOriginToSpan.js +11 -0
- package/cjs/utils/addOriginToSpan.js.map +1 -0
- package/cjs/utils/errorhandling.js +44 -0
- package/cjs/utils/errorhandling.js.map +1 -0
- package/cjs/utils/getRequestUrl.js +18 -0
- package/cjs/utils/getRequestUrl.js.map +1 -0
- package/cjs/utils/module.js +62 -0
- package/cjs/utils/module.js.map +1 -0
- package/esm/cron/common.js +54 -0
- package/esm/cron/common.js.map +1 -0
- package/esm/cron/cron.js +110 -0
- package/esm/cron/cron.js.map +1 -0
- package/esm/cron/index.js +13 -0
- package/esm/cron/index.js.map +1 -0
- package/esm/cron/node-cron.js +67 -0
- package/esm/cron/node-cron.js.map +1 -0
- package/esm/cron/node-schedule.js +64 -0
- package/esm/cron/node-schedule.js.map +1 -0
- package/esm/debug-build.js +9 -0
- package/esm/debug-build.js.map +1 -0
- package/esm/index.js +35 -3961
- package/esm/index.js.map +1 -1
- package/esm/integrations/anr/index.js +204 -0
- package/esm/integrations/anr/index.js.map +1 -0
- package/esm/integrations/anr/worker-script.js +2 -2
- package/esm/integrations/console.js +38 -0
- package/esm/integrations/console.js.map +1 -0
- package/esm/integrations/context.js +427 -0
- package/esm/integrations/context.js.map +1 -0
- package/esm/integrations/contextlines.js +131 -0
- package/esm/integrations/contextlines.js.map +1 -0
- package/esm/integrations/http.js +156 -0
- package/esm/integrations/http.js.map +1 -0
- package/esm/integrations/local-variables/common.js +81 -0
- package/esm/integrations/local-variables/common.js.map +1 -0
- package/esm/integrations/local-variables/index.js +10 -0
- package/esm/integrations/local-variables/index.js.map +1 -0
- package/esm/integrations/local-variables/local-variables-async.js +143 -0
- package/esm/integrations/local-variables/local-variables-async.js.map +1 -0
- package/esm/integrations/local-variables/local-variables-sync.js +370 -0
- package/esm/integrations/local-variables/local-variables-sync.js.map +1 -0
- package/esm/integrations/local-variables/worker-script.js +1 -1
- package/esm/integrations/modules.js +97 -0
- package/esm/integrations/modules.js.map +1 -0
- package/esm/integrations/node-fetch.js +79 -0
- package/esm/integrations/node-fetch.js.map +1 -0
- package/esm/integrations/onuncaughtexception.js +132 -0
- package/esm/integrations/onuncaughtexception.js.map +1 -0
- package/esm/integrations/onunhandledrejection.js +87 -0
- package/esm/integrations/onunhandledrejection.js.map +1 -0
- package/esm/integrations/spotlight.js +106 -0
- package/esm/integrations/spotlight.js.map +1 -0
- package/esm/integrations/tracing/connect.js +38 -0
- package/esm/integrations/tracing/connect.js.map +1 -0
- package/esm/integrations/tracing/express.js +120 -0
- package/esm/integrations/tracing/express.js.map +1 -0
- package/esm/integrations/tracing/fastify.js +78 -0
- package/esm/integrations/tracing/fastify.js.map +1 -0
- package/esm/integrations/tracing/graphql.js +30 -0
- package/esm/integrations/tracing/graphql.js.map +1 -0
- package/esm/integrations/tracing/hapi/index.js +99 -0
- package/esm/integrations/tracing/hapi/index.js.map +1 -0
- package/esm/integrations/tracing/index.js +41 -0
- package/esm/integrations/tracing/index.js.map +1 -0
- package/esm/integrations/tracing/koa.js +57 -0
- package/esm/integrations/tracing/koa.js.map +1 -0
- package/esm/integrations/tracing/mongo.js +29 -0
- package/esm/integrations/tracing/mongo.js.map +1 -0
- package/esm/integrations/tracing/mongoose.js +29 -0
- package/esm/integrations/tracing/mongoose.js.map +1 -0
- package/esm/integrations/tracing/mysql.js +22 -0
- package/esm/integrations/tracing/mysql.js.map +1 -0
- package/esm/integrations/tracing/mysql2.js +29 -0
- package/esm/integrations/tracing/mysql2.js.map +1 -0
- package/esm/integrations/tracing/nest.js +63 -0
- package/esm/integrations/tracing/nest.js.map +1 -0
- package/esm/integrations/tracing/postgres.js +30 -0
- package/esm/integrations/tracing/postgres.js.map +1 -0
- package/esm/integrations/tracing/prisma.js +43 -0
- package/esm/integrations/tracing/prisma.js.map +1 -0
- package/esm/integrations/tracing/redis.js +27 -0
- package/esm/integrations/tracing/redis.js.map +1 -0
- package/esm/nodeVersion.js +7 -0
- package/esm/nodeVersion.js.map +1 -0
- package/esm/otel/contextManager.js +14 -0
- package/esm/otel/contextManager.js.map +1 -0
- package/esm/proxy/base.js +122 -0
- package/esm/proxy/base.js.map +1 -0
- package/esm/proxy/index.js +172 -0
- package/esm/proxy/index.js.map +1 -0
- package/esm/proxy/parse-proxy-response.js +102 -0
- package/esm/proxy/parse-proxy-response.js.map +1 -0
- package/esm/sdk/api.js +42 -0
- package/esm/sdk/api.js.map +1 -0
- package/esm/sdk/client.js +58 -0
- package/esm/sdk/client.js.map +1 -0
- package/esm/sdk/init.js +312 -0
- package/esm/sdk/init.js.map +1 -0
- package/esm/sdk/initOtel.js +55 -0
- package/esm/sdk/initOtel.js.map +1 -0
- package/esm/sdk/scope.js +16 -0
- package/esm/sdk/scope.js.map +1 -0
- package/esm/transports/http.js +158 -0
- package/esm/transports/http.js.map +1 -0
- package/esm/utils/addOriginToSpan.js +9 -0
- package/esm/utils/addOriginToSpan.js.map +1 -0
- package/esm/utils/errorhandling.js +42 -0
- package/esm/utils/errorhandling.js.map +1 -0
- package/esm/utils/getRequestUrl.js +16 -0
- package/esm/utils/getRequestUrl.js.map +1 -0
- package/esm/utils/module.js +60 -0
- package/esm/utils/module.js.map +1 -0
- package/package.json +16 -16
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/types/integrations/tracing/koa.d.ts.map +1 -1
- package/types/sdk/init.d.ts +9 -1
- package/types/sdk/init.d.ts.map +1 -1
- package/types-ts3.8/index.d.ts +2 -2
- package/types-ts3.8/sdk/init.d.ts +9 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const connect = require('./connect.js');
|
|
4
|
+
const express = require('./express.js');
|
|
5
|
+
const fastify = require('./fastify.js');
|
|
6
|
+
const graphql = require('./graphql.js');
|
|
7
|
+
const index = require('./hapi/index.js');
|
|
8
|
+
const koa = require('./koa.js');
|
|
9
|
+
const mongo = require('./mongo.js');
|
|
10
|
+
const mongoose = require('./mongoose.js');
|
|
11
|
+
const mysql = require('./mysql.js');
|
|
12
|
+
const mysql2 = require('./mysql2.js');
|
|
13
|
+
const nest = require('./nest.js');
|
|
14
|
+
const postgres = require('./postgres.js');
|
|
15
|
+
const redis = require('./redis.js');
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
|
|
19
|
+
*/
|
|
20
|
+
function getAutoPerformanceIntegrations() {
|
|
21
|
+
return [
|
|
22
|
+
express.expressIntegration(),
|
|
23
|
+
fastify.fastifyIntegration(),
|
|
24
|
+
graphql.graphqlIntegration(),
|
|
25
|
+
mongo.mongoIntegration(),
|
|
26
|
+
mongoose.mongooseIntegration(),
|
|
27
|
+
mysql.mysqlIntegration(),
|
|
28
|
+
mysql2.mysql2Integration(),
|
|
29
|
+
redis.redisIntegration(),
|
|
30
|
+
postgres.postgresIntegration(),
|
|
31
|
+
// For now, we do not include prisma by default because it has ESM issues
|
|
32
|
+
// See https://github.com/prisma/prisma/issues/23410
|
|
33
|
+
// TODO v8: Figure out a better solution for this, maybe only disable in ESM mode?
|
|
34
|
+
// prismaIntegration(),
|
|
35
|
+
nest.nestIntegration(),
|
|
36
|
+
index.hapiIntegration(),
|
|
37
|
+
koa.koaIntegration(),
|
|
38
|
+
connect.connectIntegration(),
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.getAutoPerformanceIntegrations = getAutoPerformanceIntegrations;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/integrations/tracing/index.ts"],"sourcesContent":["import type { Integration } from '@sentry/types';\n\nimport { connectIntegration } from './connect';\nimport { expressIntegration } from './express';\nimport { fastifyIntegration } from './fastify';\nimport { graphqlIntegration } from './graphql';\nimport { hapiIntegration } from './hapi';\nimport { koaIntegration } from './koa';\nimport { mongoIntegration } from './mongo';\nimport { mongooseIntegration } from './mongoose';\nimport { mysqlIntegration } from './mysql';\nimport { mysql2Integration } from './mysql2';\nimport { nestIntegration } from './nest';\nimport { postgresIntegration } from './postgres';\nimport { redisIntegration } from './redis';\n\n/**\n * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.\n */\nexport function getAutoPerformanceIntegrations(): Integration[] {\n return [\n expressIntegration(),\n fastifyIntegration(),\n graphqlIntegration(),\n mongoIntegration(),\n mongooseIntegration(),\n mysqlIntegration(),\n mysql2Integration(),\n redisIntegration(),\n postgresIntegration(),\n // For now, we do not include prisma by default because it has ESM issues\n // See https://github.com/prisma/prisma/issues/23410\n // TODO v8: Figure out a better solution for this, maybe only disable in ESM mode?\n // prismaIntegration(),\n nestIntegration(),\n hapiIntegration(),\n koaIntegration(),\n connectIntegration(),\n ];\n}\n"],"names":["expressIntegration","fastifyIntegration","graphqlIntegration","mongoIntegration","mongooseIntegration","mysqlIntegration","mysql2Integration","redisIntegration","postgresIntegration","nestIntegration","hapiIntegration","koaIntegration","connectIntegration"],"mappings":";;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACO,SAAS,8BAA8B,GAAkB;AAChE,EAAE,OAAO;AACT,IAAIA,0BAAkB,EAAE;AACxB,IAAIC,0BAAkB,EAAE;AACxB,IAAIC,0BAAkB,EAAE;AACxB,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,4BAAmB,EAAE;AACzB,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,wBAAiB,EAAE;AACvB,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,4BAAmB,EAAE;AACzB;AACA;AACA;AACA;AACA,IAAIC,oBAAe,EAAE;AACrB,IAAIC,qBAAe,EAAE;AACrB,IAAIC,kBAAc,EAAE;AACpB,IAAIC,0BAAkB,EAAE;AACxB,GAAG,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const core$1 = require('@opentelemetry/core');
|
|
4
|
+
const instrumentationKoa = require('@opentelemetry/instrumentation-koa');
|
|
5
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
6
|
+
const core = require('@sentry/core');
|
|
7
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
8
|
+
const utils = require('@sentry/utils');
|
|
9
|
+
const debugBuild = require('../../debug-build.js');
|
|
10
|
+
|
|
11
|
+
const _koaIntegration = (() => {
|
|
12
|
+
return {
|
|
13
|
+
name: 'Koa',
|
|
14
|
+
setupOnce() {
|
|
15
|
+
opentelemetry.addOpenTelemetryInstrumentation(
|
|
16
|
+
new instrumentationKoa.KoaInstrumentation({
|
|
17
|
+
requestHook(span, info) {
|
|
18
|
+
if (core.getIsolationScope() === core.getDefaultIsolationScope()) {
|
|
19
|
+
debugBuild.DEBUG_BUILD &&
|
|
20
|
+
utils.logger.warn('Isolation scope is default isolation scope - skipping setting transactionName');
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const attributes = core.spanToJSON(span).data;
|
|
24
|
+
const route = attributes && attributes[semanticConventions.SEMATTRS_HTTP_ROUTE];
|
|
25
|
+
const method = info.context.request.method.toUpperCase() || 'GET';
|
|
26
|
+
if (route) {
|
|
27
|
+
core.getIsolationScope().setTransactionName(`${method} ${route}`);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}) ;
|
|
35
|
+
|
|
36
|
+
const koaIntegration = core.defineIntegration(_koaIntegration);
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
const setupKoaErrorHandler = (app) => {
|
|
40
|
+
app.use(async (ctx, next) => {
|
|
41
|
+
try {
|
|
42
|
+
await next();
|
|
43
|
+
} catch (error) {
|
|
44
|
+
core.captureException(error);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
if (!core$1.isWrapped(app.use) && core.isEnabled()) {
|
|
49
|
+
utils.consoleSandbox(() => {
|
|
50
|
+
// eslint-disable-next-line no-console
|
|
51
|
+
console.warn(
|
|
52
|
+
'[Sentry] Koa is not instrumented. This is likely because you required/imported koa before calling `Sentry.init()`.',
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.koaIntegration = koaIntegration;
|
|
59
|
+
exports.setupKoaErrorHandler = setupKoaErrorHandler;
|
|
60
|
+
//# sourceMappingURL=koa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"koa.js","sources":["../../../../src/integrations/tracing/koa.ts"],"sourcesContent":["import { isWrapped } from '@opentelemetry/core';\nimport { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';\nimport { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport {\n captureException,\n defineIntegration,\n getDefaultIsolationScope,\n getIsolationScope,\n isEnabled,\n spanToJSON,\n} from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\nimport { consoleSandbox, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../debug-build';\n\nconst _koaIntegration = (() => {\n return {\n name: 'Koa',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new KoaInstrumentation({\n requestHook(span, info) {\n if (getIsolationScope() === getDefaultIsolationScope()) {\n DEBUG_BUILD &&\n logger.warn('Isolation scope is default isolation scope - skipping setting transactionName');\n return;\n }\n const attributes = spanToJSON(span).data;\n const route = attributes && attributes[SEMATTRS_HTTP_ROUTE];\n const method = info.context.request.method.toUpperCase() || 'GET';\n if (route) {\n getIsolationScope().setTransactionName(`${method} ${route}`);\n }\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\nexport const koaIntegration = defineIntegration(_koaIntegration);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const setupKoaErrorHandler = (app: { use: (arg0: (ctx: any, next: any) => Promise<void>) => void }): void => {\n app.use(async (ctx, next) => {\n try {\n await next();\n } catch (error) {\n captureException(error);\n }\n });\n\n if (!isWrapped(app.use) && isEnabled()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] Koa is not instrumented. This is likely because you required/imported koa before calling `Sentry.init()`.',\n );\n });\n }\n};\n"],"names":["addOpenTelemetryInstrumentation","KoaInstrumentation","getIsolationScope","getDefaultIsolationScope","DEBUG_BUILD","logger","spanToJSON","SEMATTRS_HTTP_ROUTE","defineIntegration","captureException","isWrapped","isEnabled","consoleSandbox"],"mappings":";;;;;;;;;;AAgBA,MAAM,eAAgB,IAAG,MAAM;AAC/B,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B;AACrC,QAAQ,IAAIC,qCAAkB,CAAC;AAC/B,UAAU,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE;AAClC,YAAY,IAAIC,sBAAiB,OAAOC,6BAAwB,EAAE,EAAE;AACpE,cAAcC,sBAAY;AAC1B,gBAAgBC,YAAM,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAA;AAC5G,cAAc,OAAM;AACpB,aAAY;AACZ,YAAY,MAAM,aAAaC,eAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAA;AACpD,YAAY,MAAM,QAAQ,UAAA,IAAc,UAAU,CAACC,uCAAmB,CAAC,CAAA;AACvE,YAAY,MAAM,MAAA,GAAS,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAC,IAAK,KAAK,CAAA;AAC7E,YAAY,IAAI,KAAK,EAAE;AACvB,cAAcL,sBAAiB,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAA,MAAA,CAAA,CAAA,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,aAAA;AACA,WAAA;AACA,SAAA,CAAA;AACA,OAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA;AACA,CAAA,CAAA,EAAA;AACA;AACA,MAAA,cAAA,GAAAM,sBAAA,CAAA,eAAA,EAAA;AACA;AACA;AACA,MAAA,oBAAA,GAAA,CAAA,GAAA,KAAA;AACA,EAAA,GAAA,CAAA,GAAA,CAAA,OAAA,GAAA,EAAA,IAAA,KAAA;AACA,IAAA,IAAA;AACA,MAAA,MAAA,IAAA,EAAA,CAAA;AACA,KAAA,CAAA,OAAA,KAAA,EAAA;AACA,MAAAC,qBAAA,CAAA,KAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA,CAAA;AACA;AACA,EAAA,IAAA,CAAAC,gBAAA,CAAA,GAAA,CAAA,GAAA,CAAA,IAAAC,cAAA,EAAA,EAAA;AACA,IAAAC,oBAAA,CAAA,MAAA;AACA;AACA,MAAA,OAAA,CAAA,IAAA;AACA,QAAA,oHAAA;AACA,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,GAAA;AACA;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const instrumentationMongodb = require('@opentelemetry/instrumentation-mongodb');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
6
|
+
const addOriginToSpan = require('../../utils/addOriginToSpan.js');
|
|
7
|
+
|
|
8
|
+
const _mongoIntegration = (() => {
|
|
9
|
+
return {
|
|
10
|
+
name: 'Mongo',
|
|
11
|
+
setupOnce() {
|
|
12
|
+
opentelemetry.addOpenTelemetryInstrumentation(
|
|
13
|
+
new instrumentationMongodb.MongoDBInstrumentation({
|
|
14
|
+
responseHook(span) {
|
|
15
|
+
addOriginToSpan.addOriginToSpan(span, 'auto.db.otel.mongo');
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}) ;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* MongoDB integration
|
|
25
|
+
*
|
|
26
|
+
* Capture tracing data for MongoDB.
|
|
27
|
+
*/
|
|
28
|
+
const mongoIntegration = core.defineIntegration(_mongoIntegration);
|
|
29
|
+
|
|
30
|
+
exports.mongoIntegration = mongoIntegration;
|
|
31
|
+
//# sourceMappingURL=mongo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo.js","sources":["../../../../src/integrations/tracing/mongo.ts"],"sourcesContent":["import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _mongoIntegration = (() => {\n return {\n name: 'Mongo',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new MongoDBInstrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongo');\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * MongoDB integration\n *\n * Capture tracing data for MongoDB.\n */\nexport const mongoIntegration = defineIntegration(_mongoIntegration);\n"],"names":["addOpenTelemetryInstrumentation","MongoDBInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;;AAOA,MAAM,iBAAkB,IAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B;AACrC,QAAQ,IAAIC,6CAAsB,CAAC;AACnC,UAAU,YAAY,CAAC,IAAI,EAAE;AAC7B,YAAYC,+BAAe,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAA;AACvD,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAA;AACP,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,gBAAiB,GAAEC,sBAAiB,CAAC,iBAAiB;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const instrumentationMongoose = require('@opentelemetry/instrumentation-mongoose');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
6
|
+
const addOriginToSpan = require('../../utils/addOriginToSpan.js');
|
|
7
|
+
|
|
8
|
+
const _mongooseIntegration = (() => {
|
|
9
|
+
return {
|
|
10
|
+
name: 'Mongoose',
|
|
11
|
+
setupOnce() {
|
|
12
|
+
opentelemetry.addOpenTelemetryInstrumentation(
|
|
13
|
+
new instrumentationMongoose.MongooseInstrumentation({
|
|
14
|
+
responseHook(span) {
|
|
15
|
+
addOriginToSpan.addOriginToSpan(span, 'auto.db.otel.mongoose');
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}) ;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Mongoose integration
|
|
25
|
+
*
|
|
26
|
+
* Capture tracing data for Mongoose.
|
|
27
|
+
*/
|
|
28
|
+
const mongooseIntegration = core.defineIntegration(_mongooseIntegration);
|
|
29
|
+
|
|
30
|
+
exports.mongooseIntegration = mongooseIntegration;
|
|
31
|
+
//# sourceMappingURL=mongoose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongoose.js","sources":["../../../../src/integrations/tracing/mongoose.ts"],"sourcesContent":["import { MongooseInstrumentation } from '@opentelemetry/instrumentation-mongoose';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _mongooseIntegration = (() => {\n return {\n name: 'Mongoose',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new MongooseInstrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongoose');\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Mongoose integration\n *\n * Capture tracing data for Mongoose.\n */\nexport const mongooseIntegration = defineIntegration(_mongooseIntegration);\n"],"names":["addOpenTelemetryInstrumentation","MongooseInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;;AAOA,MAAM,oBAAqB,IAAG,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,UAAU;AACpB,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B;AACrC,QAAQ,IAAIC,+CAAuB,CAAC;AACpC,UAAU,YAAY,CAAC,IAAI,EAAE;AAC7B,YAAYC,+BAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;AAC1D,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAA;AACP,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,mBAAoB,GAAEC,sBAAiB,CAAC,oBAAoB;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const instrumentationMysql = require('@opentelemetry/instrumentation-mysql');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
6
|
+
|
|
7
|
+
const _mysqlIntegration = (() => {
|
|
8
|
+
return {
|
|
9
|
+
name: 'Mysql',
|
|
10
|
+
setupOnce() {
|
|
11
|
+
opentelemetry.addOpenTelemetryInstrumentation(new instrumentationMysql.MySQLInstrumentation({}));
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
}) ;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* MySQL integration
|
|
18
|
+
*
|
|
19
|
+
* Capture tracing data for mysql.
|
|
20
|
+
*/
|
|
21
|
+
const mysqlIntegration = core.defineIntegration(_mysqlIntegration);
|
|
22
|
+
|
|
23
|
+
exports.mysqlIntegration = mysqlIntegration;
|
|
24
|
+
//# sourceMappingURL=mysql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mysql.js","sources":["../../../../src/integrations/tracing/mysql.ts"],"sourcesContent":["import { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _mysqlIntegration = (() => {\n return {\n name: 'Mysql',\n setupOnce() {\n addOpenTelemetryInstrumentation(new MySQLInstrumentation({}));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * MySQL integration\n *\n * Capture tracing data for mysql.\n */\nexport const mysqlIntegration = defineIntegration(_mysqlIntegration);\n"],"names":["addOpenTelemetryInstrumentation","MySQLInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,iBAAkB,IAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B,CAAC,IAAIC,yCAAoB,CAAC,EAAE,CAAC,CAAC,CAAA;AACnE,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,gBAAiB,GAAEC,sBAAiB,CAAC,iBAAiB;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const instrumentationMysql2 = require('@opentelemetry/instrumentation-mysql2');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
6
|
+
const addOriginToSpan = require('../../utils/addOriginToSpan.js');
|
|
7
|
+
|
|
8
|
+
const _mysql2Integration = (() => {
|
|
9
|
+
return {
|
|
10
|
+
name: 'Mysql2',
|
|
11
|
+
setupOnce() {
|
|
12
|
+
opentelemetry.addOpenTelemetryInstrumentation(
|
|
13
|
+
new instrumentationMysql2.MySQL2Instrumentation({
|
|
14
|
+
responseHook(span) {
|
|
15
|
+
addOriginToSpan.addOriginToSpan(span, 'auto.db.otel.mysql2');
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}) ;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* MySQL2 integration
|
|
25
|
+
*
|
|
26
|
+
* Capture tracing data for mysql2
|
|
27
|
+
*/
|
|
28
|
+
const mysql2Integration = core.defineIntegration(_mysql2Integration);
|
|
29
|
+
|
|
30
|
+
exports.mysql2Integration = mysql2Integration;
|
|
31
|
+
//# sourceMappingURL=mysql2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mysql2.js","sources":["../../../../src/integrations/tracing/mysql2.ts"],"sourcesContent":["import { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _mysql2Integration = (() => {\n return {\n name: 'Mysql2',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new MySQL2Instrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mysql2');\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * MySQL2 integration\n *\n * Capture tracing data for mysql2\n */\nexport const mysql2Integration = defineIntegration(_mysql2Integration);\n"],"names":["addOpenTelemetryInstrumentation","MySQL2Instrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;;AAOA,MAAM,kBAAmB,IAAG,MAAM;AAClC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B;AACrC,QAAQ,IAAIC,2CAAqB,CAAC;AAClC,UAAU,YAAY,CAAC,IAAI,EAAE;AAC7B,YAAYC,+BAAe,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAA;AACxD,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAA;AACP,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,iBAAkB,GAAEC,sBAAiB,CAAC,kBAAkB;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var {
|
|
2
|
+
_optionalChain
|
|
3
|
+
} = require('@sentry/utils');
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
+
|
|
7
|
+
const instrumentationNestjsCore = require('@opentelemetry/instrumentation-nestjs-core');
|
|
8
|
+
const core = require('@sentry/core');
|
|
9
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
10
|
+
const utils = require('@sentry/utils');
|
|
11
|
+
|
|
12
|
+
const _nestIntegration = (() => {
|
|
13
|
+
return {
|
|
14
|
+
name: 'Nest',
|
|
15
|
+
setupOnce() {
|
|
16
|
+
opentelemetry.addOpenTelemetryInstrumentation(new instrumentationNestjsCore.NestInstrumentation({}));
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}) ;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Nest framework integration
|
|
23
|
+
*
|
|
24
|
+
* Capture tracing data for nest.
|
|
25
|
+
*/
|
|
26
|
+
const nestIntegration = core.defineIntegration(_nestIntegration);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Setup an error handler for Nest.
|
|
30
|
+
*/
|
|
31
|
+
function setupNestErrorHandler(app, baseFilter) {
|
|
32
|
+
app.useGlobalInterceptors({
|
|
33
|
+
intercept(context, next) {
|
|
34
|
+
if (core.getIsolationScope() === core.getDefaultIsolationScope()) {
|
|
35
|
+
utils.logger.warn('Isolation scope is still the default isolation scope, skipping setting transactionName.');
|
|
36
|
+
return next.handle();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (context.getType() === 'http') {
|
|
40
|
+
const req = context.switchToHttp().getRequest();
|
|
41
|
+
if (req.route) {
|
|
42
|
+
core.getIsolationScope().setTransactionName(`${_optionalChain([req, 'access', _ => _.method, 'optionalAccess', _2 => _2.toUpperCase, 'call', _3 => _3()]) || 'GET'} ${req.route.path}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return next.handle();
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const wrappedFilter = new Proxy(baseFilter, {
|
|
51
|
+
get(target, prop, receiver) {
|
|
52
|
+
if (prop === 'catch') {
|
|
53
|
+
const originalCatch = Reflect.get(target, prop, receiver);
|
|
54
|
+
|
|
55
|
+
return (exception, host) => {
|
|
56
|
+
core.captureException(exception);
|
|
57
|
+
return originalCatch.apply(target, [exception, host]);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return Reflect.get(target, prop, receiver);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
app.useGlobalFilters(wrappedFilter);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.nestIntegration = nestIntegration;
|
|
68
|
+
exports.setupNestErrorHandler = setupNestErrorHandler;
|
|
69
|
+
//# sourceMappingURL=nest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nest.js","sources":["../../../../src/integrations/tracing/nest.ts"],"sourcesContent":["import { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';\nimport { captureException, defineIntegration, getDefaultIsolationScope, getIsolationScope } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\ninterface MinimalNestJsExecutionContext {\n getType: () => string;\n\n switchToHttp: () => {\n // minimal request object\n // according to official types, all properties are required but\n // let's play it safe and assume they're optional\n getRequest: () => {\n route?: {\n path?: string;\n };\n method?: string;\n };\n };\n}\n\ninterface NestJsErrorFilter {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n catch(exception: any, host: any): void;\n}\n\ninterface MinimalNestJsApp {\n useGlobalFilters: (arg0: NestJsErrorFilter) => void;\n useGlobalInterceptors: (interceptor: {\n intercept: (context: MinimalNestJsExecutionContext, next: { handle: () => void }) => void;\n }) => void;\n}\n\nconst _nestIntegration = (() => {\n return {\n name: 'Nest',\n setupOnce() {\n addOpenTelemetryInstrumentation(new NestInstrumentation({}));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Nest framework integration\n *\n * Capture tracing data for nest.\n */\nexport const nestIntegration = defineIntegration(_nestIntegration);\n\n/**\n * Setup an error handler for Nest.\n */\nexport function setupNestErrorHandler(app: MinimalNestJsApp, baseFilter: NestJsErrorFilter): void {\n app.useGlobalInterceptors({\n intercept(context, next) {\n if (getIsolationScope() === getDefaultIsolationScope()) {\n logger.warn('Isolation scope is still the default isolation scope, skipping setting transactionName.');\n return next.handle();\n }\n\n if (context.getType() === 'http') {\n const req = context.switchToHttp().getRequest();\n if (req.route) {\n getIsolationScope().setTransactionName(`${req.method?.toUpperCase() || 'GET'} ${req.route.path}`);\n }\n }\n\n return next.handle();\n },\n });\n\n const wrappedFilter = new Proxy(baseFilter, {\n get(target, prop, receiver) {\n if (prop === 'catch') {\n const originalCatch = Reflect.get(target, prop, receiver);\n\n return (exception: unknown, host: unknown) => {\n captureException(exception);\n return originalCatch.apply(target, [exception, host]);\n };\n }\n return Reflect.get(target, prop, receiver);\n },\n });\n\n app.useGlobalFilters(wrappedFilter);\n}\n"],"names":["addOpenTelemetryInstrumentation","NestInstrumentation","defineIntegration","getIsolationScope","getDefaultIsolationScope","logger","captureException"],"mappings":";;;;;;;;;;;AAkCA,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAoB,CAAM,EAAA,CAAA,EAAA;EAC9B,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA;IACL,CAAA,CAAA,CAAA,CAAI,EAAE,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA;IACZ,SAAS,CAAG,EAAA;MACVA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA+B,CAAC,CAAIC,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA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AA,CAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA;UACAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;UACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA;MACA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA;EACA,CAAA,CAAA;;EAEA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const instrumentationPg = require('@opentelemetry/instrumentation-pg');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
6
|
+
const addOriginToSpan = require('../../utils/addOriginToSpan.js');
|
|
7
|
+
|
|
8
|
+
const _postgresIntegration = (() => {
|
|
9
|
+
return {
|
|
10
|
+
name: 'Postgres',
|
|
11
|
+
setupOnce() {
|
|
12
|
+
opentelemetry.addOpenTelemetryInstrumentation(
|
|
13
|
+
new instrumentationPg.PgInstrumentation({
|
|
14
|
+
requireParentSpan: true,
|
|
15
|
+
requestHook(span) {
|
|
16
|
+
addOriginToSpan.addOriginToSpan(span, 'auto.db.otel.postgres');
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}) ;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Postgres integration
|
|
26
|
+
*
|
|
27
|
+
* Capture tracing data for pg.
|
|
28
|
+
*/
|
|
29
|
+
const postgresIntegration = core.defineIntegration(_postgresIntegration);
|
|
30
|
+
|
|
31
|
+
exports.postgresIntegration = postgresIntegration;
|
|
32
|
+
//# sourceMappingURL=postgres.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres.js","sources":["../../../../src/integrations/tracing/postgres.ts"],"sourcesContent":["import { PgInstrumentation } from '@opentelemetry/instrumentation-pg';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _postgresIntegration = (() => {\n return {\n name: 'Postgres',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new PgInstrumentation({\n requireParentSpan: true,\n requestHook(span) {\n addOriginToSpan(span, 'auto.db.otel.postgres');\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Postgres integration\n *\n * Capture tracing data for pg.\n */\nexport const postgresIntegration = defineIntegration(_postgresIntegration);\n"],"names":["addOpenTelemetryInstrumentation","PgInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;;AAOA,MAAM,oBAAqB,IAAG,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,UAAU;AACpB,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B;AACrC,QAAQ,IAAIC,mCAAiB,CAAC;AAC9B,UAAU,iBAAiB,EAAE,IAAI;AACjC,UAAU,WAAW,CAAC,IAAI,EAAE;AAC5B,YAAYC,+BAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;AAC1D,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAA;AACP,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,mBAAoB,GAAEC,sBAAiB,CAAC,oBAAoB;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var {
|
|
2
|
+
_optionalChain
|
|
3
|
+
} = require('@sentry/utils');
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
+
|
|
7
|
+
const prismaInstrumentation = require('@prisma/instrumentation');
|
|
8
|
+
const core = require('@sentry/core');
|
|
9
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
10
|
+
|
|
11
|
+
const _prismaIntegration = (() => {
|
|
12
|
+
return {
|
|
13
|
+
name: 'Prisma',
|
|
14
|
+
setupOnce() {
|
|
15
|
+
opentelemetry.addOpenTelemetryInstrumentation(
|
|
16
|
+
// does not have a hook to adjust spans & add origin
|
|
17
|
+
new prismaInstrumentation.PrismaInstrumentation({}),
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
setup(client) {
|
|
22
|
+
client.on('spanStart', span => {
|
|
23
|
+
const spanJSON = core.spanToJSON(span);
|
|
24
|
+
if (_optionalChain([spanJSON, 'access', _ => _.description, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3('prisma:')])) {
|
|
25
|
+
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.prisma');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (spanJSON.description === 'prisma:engine:db_query') {
|
|
29
|
+
span.setAttribute('db.system', 'prisma');
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}) ;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Prisma integration
|
|
38
|
+
*
|
|
39
|
+
* Capture tracing data for prisma.
|
|
40
|
+
* Note: This requieres to set:
|
|
41
|
+
* previewFeatures = ["tracing"]
|
|
42
|
+
* For the prisma client.
|
|
43
|
+
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details.
|
|
44
|
+
*/
|
|
45
|
+
const prismaIntegration = core.defineIntegration(_prismaIntegration);
|
|
46
|
+
|
|
47
|
+
exports.prismaIntegration = prismaIntegration;
|
|
48
|
+
//# sourceMappingURL=prisma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma.js","sources":["../../../../src/integrations/tracing/prisma.ts"],"sourcesContent":["// When importing CJS modules into an ESM module, we cannot import the named exports directly.\nimport * as prismaInstrumentation from '@prisma/instrumentation';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, defineIntegration, spanToJSON } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _prismaIntegration = (() => {\n return {\n name: 'Prisma',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n // does not have a hook to adjust spans & add origin\n new prismaInstrumentation.PrismaInstrumentation({}),\n );\n },\n\n setup(client) {\n client.on('spanStart', span => {\n const spanJSON = spanToJSON(span);\n if (spanJSON.description?.startsWith('prisma:')) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.prisma');\n }\n\n if (spanJSON.description === 'prisma:engine:db_query') {\n span.setAttribute('db.system', 'prisma');\n }\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Prisma integration\n *\n * Capture tracing data for prisma.\n * Note: This requieres to set:\n * previewFeatures = [\"tracing\"]\n * For the prisma client.\n * See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details.\n */\nexport const prismaIntegration = defineIntegration(_prismaIntegration);\n"],"names":["addOpenTelemetryInstrumentation","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","defineIntegration"],"mappings":";;;;;;;;;;AAMA,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAsB,CAAM,EAAA,CAAA,EAAA;EAChC,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA;IACL,CAAA,CAAA,CAAA,CAAI,EAAE,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACd,SAAS,CAAG,EAAA;MACVA,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACrC,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACQ,IAAI,CAAqB,CAAA,CAAA,CAAA,CAAA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,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;MACa,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAEC,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const instrumentationIoredis = require('@opentelemetry/instrumentation-ioredis');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
6
|
+
|
|
7
|
+
const _redisIntegration = (() => {
|
|
8
|
+
return {
|
|
9
|
+
name: 'Redis',
|
|
10
|
+
setupOnce() {
|
|
11
|
+
opentelemetry.addOpenTelemetryInstrumentation([
|
|
12
|
+
new instrumentationIoredis.IORedisInstrumentation({}),
|
|
13
|
+
// todo: implement them gradually
|
|
14
|
+
// new LegacyRedisInstrumentation({}),
|
|
15
|
+
// new RedisInstrumentation({}),
|
|
16
|
+
]);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}) ;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Redis integration for "ioredis"
|
|
23
|
+
*
|
|
24
|
+
* Capture tracing data for redis and ioredis.
|
|
25
|
+
*/
|
|
26
|
+
const redisIntegration = core.defineIntegration(_redisIntegration);
|
|
27
|
+
|
|
28
|
+
exports.redisIntegration = redisIntegration;
|
|
29
|
+
//# sourceMappingURL=redis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redis.js","sources":["../../../../src/integrations/tracing/redis.ts"],"sourcesContent":["import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _redisIntegration = (() => {\n return {\n name: 'Redis',\n setupOnce() {\n addOpenTelemetryInstrumentation([\n new IORedisInstrumentation({}),\n // todo: implement them gradually\n // new LegacyRedisInstrumentation({}),\n // new RedisInstrumentation({}),\n ]);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Redis integration for \"ioredis\"\n *\n * Capture tracing data for redis and ioredis.\n */\nexport const redisIntegration = defineIntegration(_redisIntegration);\n"],"names":["addOpenTelemetryInstrumentation","IORedisInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,iBAAkB,IAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,SAAS,GAAG;AAChB,MAAMA,6CAA+B,CAAC;AACtC,QAAQ,IAAIC,6CAAsB,CAAC,EAAE,CAAC;AACtC;AACA;AACA;AACA,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,gBAAiB,GAAEC,sBAAiB,CAAC,iBAAiB;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const utils = require('@sentry/utils');
|
|
4
|
+
|
|
5
|
+
const NODE_VERSION = utils.parseSemver(process.versions.node) ;
|
|
6
|
+
const NODE_MAJOR = NODE_VERSION.major;
|
|
7
|
+
|
|
8
|
+
exports.NODE_MAJOR = NODE_MAJOR;
|
|
9
|
+
exports.NODE_VERSION = NODE_VERSION;
|
|
10
|
+
//# sourceMappingURL=nodeVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeVersion.js","sources":["../../src/nodeVersion.ts"],"sourcesContent":["import { parseSemver } from '@sentry/utils';\n\nexport const NODE_VERSION = parseSemver(process.versions.node) as { major: number; minor: number; patch: number };\nexport const NODE_MAJOR = NODE_VERSION.major;\n"],"names":["parseSemver"],"mappings":";;;;AAEO,MAAM,YAAa,GAAEA,iBAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAE,EAAA;AAClD,MAAA,UAAA,GAAa,YAAY,CAAC;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const contextAsyncHooks = require('@opentelemetry/context-async-hooks');
|
|
4
|
+
const opentelemetry = require('@sentry/opentelemetry');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.
|
|
8
|
+
* It ensures that we create a new hub per context, so that the OTEL Context & the Sentry Hub are always in sync.
|
|
9
|
+
*
|
|
10
|
+
* Note that we currently only support AsyncHooks with this,
|
|
11
|
+
* but since this should work for Node 14+ anyhow that should be good enough.
|
|
12
|
+
*/
|
|
13
|
+
const SentryContextManager = opentelemetry.wrapContextManagerClass(contextAsyncHooks.AsyncLocalStorageContextManager);
|
|
14
|
+
|
|
15
|
+
exports.SentryContextManager = SentryContextManager;
|
|
16
|
+
//# sourceMappingURL=contextManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextManager.js","sources":["../../../src/otel/contextManager.ts"],"sourcesContent":["import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';\nimport { wrapContextManagerClass } from '@sentry/opentelemetry';\n\n/**\n * This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.\n * It ensures that we create a new hub per context, so that the OTEL Context & the Sentry Hub are always in sync.\n *\n * Note that we currently only support AsyncHooks with this,\n * but since this should work for Node 14+ anyhow that should be good enough.\n */\nexport const SentryContextManager = wrapContextManagerClass(AsyncLocalStorageContextManager);\n"],"names":["wrapContextManagerClass","AsyncLocalStorageContextManager"],"mappings":";;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,oBAAqB,GAAEA,qCAAuB,CAACC,iDAA+B;;;;"}
|