@sentry/node 8.0.0-alpha.1 → 8.0.0-alpha.3
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/README.md +14 -93
- package/cjs/index.js +3665 -77
- package/cjs/index.js.map +1 -1
- package/esm/index.js +3614 -31
- package/esm/index.js.map +1 -1
- package/esm/integrations/anr/worker-script.js +2 -2
- package/esm/package.json +1 -0
- package/package.json +21 -6
- package/types/index.d.ts +6 -5
- package/types/index.d.ts.map +1 -1
- package/types/integrations/anr/index.d.ts.map +1 -1
- package/types/integrations/anr/worker-script.d.ts +1 -1
- package/types/integrations/anr/worker-script.d.ts.map +1 -1
- package/types/integrations/http.d.ts +4 -0
- package/types/integrations/http.d.ts.map +1 -1
- package/types/integrations/local-variables/common.d.ts +1 -0
- package/types/integrations/local-variables/common.d.ts.map +1 -1
- package/types/integrations/local-variables/local-variables-sync.d.ts +1 -0
- package/types/integrations/local-variables/local-variables-sync.d.ts.map +1 -1
- package/types/integrations/tracing/fastify.d.ts +9 -0
- package/types/integrations/tracing/fastify.d.ts.map +1 -1
- package/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/types/integrations/tracing/prisma.d.ts.map +1 -1
- package/types/proxy/helpers.d.ts +2 -2
- package/types/proxy/helpers.d.ts.map +1 -1
- package/types/proxy/index.d.ts.map +1 -1
- package/types/sdk/hub.d.ts.map +1 -1
- package/types/sdk/init.d.ts.map +1 -1
- package/types/transports/http-module.d.ts +2 -2
- package/types/transports/http-module.d.ts.map +1 -1
- package/types/types.d.ts +12 -4
- package/types/types.d.ts.map +1 -1
- package/types-ts3.8/index.d.ts +6 -5
- package/types-ts3.8/integrations/anr/worker-script.d.ts +1 -1
- package/types-ts3.8/integrations/http.d.ts +4 -0
- package/types-ts3.8/integrations/local-variables/common.d.ts +1 -0
- package/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +1 -0
- package/types-ts3.8/integrations/tracing/fastify.d.ts +9 -0
- package/types-ts3.8/proxy/helpers.d.ts +2 -2
- package/types-ts3.8/transports/http-module.d.ts +2 -2
- package/types-ts3.8/types.d.ts +12 -4
- package/cjs/cron/common.js +0 -56
- package/cjs/cron/common.js.map +0 -1
- package/cjs/cron/cron.js +0 -102
- package/cjs/cron/cron.js.map +0 -1
- package/cjs/cron/index.js +0 -15
- package/cjs/cron/index.js.map +0 -1
- package/cjs/cron/node-cron.js +0 -61
- package/cjs/cron/node-cron.js.map +0 -1
- package/cjs/cron/node-schedule.js +0 -57
- package/cjs/cron/node-schedule.js.map +0 -1
- package/cjs/debug-build.js +0 -11
- package/cjs/debug-build.js.map +0 -1
- package/cjs/integrations/anr/index.js +0 -145
- package/cjs/integrations/anr/index.js.map +0 -1
- package/cjs/integrations/anr/worker-script.js +0 -2
- package/cjs/integrations/anr/worker-script.js.map +0 -1
- package/cjs/integrations/console.js +0 -40
- package/cjs/integrations/console.js.map +0 -1
- package/cjs/integrations/context.js +0 -435
- package/cjs/integrations/context.js.map +0 -1
- package/cjs/integrations/contextlines.js +0 -137
- package/cjs/integrations/contextlines.js.map +0 -1
- package/cjs/integrations/http.js +0 -137
- package/cjs/integrations/http.js.map +0 -1
- package/cjs/integrations/local-variables/common.js +0 -87
- package/cjs/integrations/local-variables/common.js.map +0 -1
- package/cjs/integrations/local-variables/index.js +0 -8
- package/cjs/integrations/local-variables/index.js.map +0 -1
- package/cjs/integrations/local-variables/local-variables-sync.js +0 -400
- package/cjs/integrations/local-variables/local-variables-sync.js.map +0 -1
- package/cjs/integrations/modules.js +0 -99
- package/cjs/integrations/modules.js.map +0 -1
- package/cjs/integrations/node-fetch.js +0 -82
- package/cjs/integrations/node-fetch.js.map +0 -1
- package/cjs/integrations/onuncaughtexception.js +0 -137
- package/cjs/integrations/onuncaughtexception.js.map +0 -1
- package/cjs/integrations/onunhandledrejection.js +0 -90
- package/cjs/integrations/onunhandledrejection.js.map +0 -1
- package/cjs/integrations/spotlight.js +0 -109
- package/cjs/integrations/spotlight.js.map +0 -1
- package/cjs/integrations/tracing/express.js +0 -103
- package/cjs/integrations/tracing/express.js.map +0 -1
- package/cjs/integrations/tracing/fastify.js +0 -33
- package/cjs/integrations/tracing/fastify.js.map +0 -1
- package/cjs/integrations/tracing/graphql.js +0 -34
- package/cjs/integrations/tracing/graphql.js.map +0 -1
- package/cjs/integrations/tracing/hapi/index.js +0 -81
- package/cjs/integrations/tracing/hapi/index.js.map +0 -1
- package/cjs/integrations/tracing/index.js +0 -37
- package/cjs/integrations/tracing/index.js.map +0 -1
- package/cjs/integrations/tracing/koa.js +0 -21
- package/cjs/integrations/tracing/koa.js.map +0 -1
- package/cjs/integrations/tracing/mongo.js +0 -33
- package/cjs/integrations/tracing/mongo.js.map +0 -1
- package/cjs/integrations/tracing/mongoose.js +0 -33
- package/cjs/integrations/tracing/mongoose.js.map +0 -1
- package/cjs/integrations/tracing/mysql.js +0 -26
- package/cjs/integrations/tracing/mysql.js.map +0 -1
- package/cjs/integrations/tracing/mysql2.js +0 -33
- package/cjs/integrations/tracing/mysql2.js.map +0 -1
- package/cjs/integrations/tracing/nest.js +0 -26
- package/cjs/integrations/tracing/nest.js.map +0 -1
- package/cjs/integrations/tracing/postgres.js +0 -34
- package/cjs/integrations/tracing/postgres.js.map +0 -1
- package/cjs/integrations/tracing/prisma.js +0 -33
- package/cjs/integrations/tracing/prisma.js.map +0 -1
- package/cjs/nodeVersion.js +0 -12
- package/cjs/nodeVersion.js.map +0 -1
- package/cjs/otel/contextManager.js +0 -16
- package/cjs/otel/contextManager.js.map +0 -1
- package/cjs/proxy/base.js +0 -126
- package/cjs/proxy/base.js.map +0 -1
- package/cjs/proxy/index.js +0 -209
- package/cjs/proxy/index.js.map +0 -1
- package/cjs/proxy/parse-proxy-response.js +0 -104
- package/cjs/proxy/parse-proxy-response.js.map +0 -1
- package/cjs/sdk/api.js +0 -74
- package/cjs/sdk/api.js.map +0 -1
- package/cjs/sdk/client.js +0 -57
- package/cjs/sdk/client.js.map +0 -1
- package/cjs/sdk/hub.js +0 -104
- package/cjs/sdk/hub.js.map +0 -1
- package/cjs/sdk/init.js +0 -224
- package/cjs/sdk/init.js.map +0 -1
- package/cjs/sdk/initOtel.js +0 -70
- package/cjs/sdk/initOtel.js.map +0 -1
- package/cjs/sdk/scope.js +0 -18
- package/cjs/sdk/scope.js.map +0 -1
- package/cjs/transports/http.js +0 -160
- package/cjs/transports/http.js.map +0 -1
- package/cjs/utils/addOriginToSpan.js +0 -11
- package/cjs/utils/addOriginToSpan.js.map +0 -1
- package/cjs/utils/errorhandling.js +0 -44
- package/cjs/utils/errorhandling.js.map +0 -1
- package/cjs/utils/getRequestUrl.js +0 -18
- package/cjs/utils/getRequestUrl.js.map +0 -1
- package/cjs/utils/module.js +0 -62
- package/cjs/utils/module.js.map +0 -1
- package/esm/cron/common.js +0 -54
- package/esm/cron/common.js.map +0 -1
- package/esm/cron/cron.js +0 -100
- package/esm/cron/cron.js.map +0 -1
- package/esm/cron/index.js +0 -13
- package/esm/cron/index.js.map +0 -1
- package/esm/cron/node-cron.js +0 -56
- package/esm/cron/node-cron.js.map +0 -1
- package/esm/cron/node-schedule.js +0 -55
- package/esm/cron/node-schedule.js.map +0 -1
- package/esm/debug-build.js +0 -9
- package/esm/debug-build.js.map +0 -1
- package/esm/integrations/anr/index.js +0 -139
- package/esm/integrations/anr/index.js.map +0 -1
- package/esm/integrations/anr/worker-script.js.map +0 -1
- package/esm/integrations/console.js +0 -38
- package/esm/integrations/console.js.map +0 -1
- package/esm/integrations/context.js +0 -427
- package/esm/integrations/context.js.map +0 -1
- package/esm/integrations/contextlines.js +0 -131
- package/esm/integrations/contextlines.js.map +0 -1
- package/esm/integrations/http.js +0 -132
- package/esm/integrations/http.js.map +0 -1
- package/esm/integrations/local-variables/common.js +0 -81
- package/esm/integrations/local-variables/common.js.map +0 -1
- package/esm/integrations/local-variables/index.js +0 -6
- package/esm/integrations/local-variables/index.js.map +0 -1
- package/esm/integrations/local-variables/local-variables-sync.js +0 -394
- package/esm/integrations/local-variables/local-variables-sync.js.map +0 -1
- package/esm/integrations/modules.js +0 -97
- package/esm/integrations/modules.js.map +0 -1
- package/esm/integrations/node-fetch.js +0 -80
- package/esm/integrations/node-fetch.js.map +0 -1
- package/esm/integrations/onuncaughtexception.js +0 -134
- package/esm/integrations/onuncaughtexception.js.map +0 -1
- package/esm/integrations/onunhandledrejection.js +0 -87
- package/esm/integrations/onunhandledrejection.js.map +0 -1
- package/esm/integrations/spotlight.js +0 -106
- package/esm/integrations/spotlight.js.map +0 -1
- package/esm/integrations/tracing/express.js +0 -96
- package/esm/integrations/tracing/express.js.map +0 -1
- package/esm/integrations/tracing/fastify.js +0 -31
- package/esm/integrations/tracing/fastify.js.map +0 -1
- package/esm/integrations/tracing/graphql.js +0 -32
- package/esm/integrations/tracing/graphql.js.map +0 -1
- package/esm/integrations/tracing/hapi/index.js +0 -77
- package/esm/integrations/tracing/hapi/index.js.map +0 -1
- package/esm/integrations/tracing/index.js +0 -35
- package/esm/integrations/tracing/index.js.map +0 -1
- package/esm/integrations/tracing/koa.js +0 -19
- package/esm/integrations/tracing/koa.js.map +0 -1
- package/esm/integrations/tracing/mongo.js +0 -31
- package/esm/integrations/tracing/mongo.js.map +0 -1
- package/esm/integrations/tracing/mongoose.js +0 -31
- package/esm/integrations/tracing/mongoose.js.map +0 -1
- package/esm/integrations/tracing/mysql.js +0 -24
- package/esm/integrations/tracing/mysql.js.map +0 -1
- package/esm/integrations/tracing/mysql2.js +0 -31
- package/esm/integrations/tracing/mysql2.js.map +0 -1
- package/esm/integrations/tracing/nest.js +0 -24
- package/esm/integrations/tracing/nest.js.map +0 -1
- package/esm/integrations/tracing/postgres.js +0 -32
- package/esm/integrations/tracing/postgres.js.map +0 -1
- package/esm/integrations/tracing/prisma.js +0 -31
- package/esm/integrations/tracing/prisma.js.map +0 -1
- package/esm/nodeVersion.js +0 -9
- package/esm/nodeVersion.js.map +0 -1
- package/esm/otel/contextManager.js +0 -14
- package/esm/otel/contextManager.js.map +0 -1
- package/esm/proxy/base.js +0 -121
- package/esm/proxy/base.js.map +0 -1
- package/esm/proxy/index.js +0 -203
- package/esm/proxy/index.js.map +0 -1
- package/esm/proxy/parse-proxy-response.js +0 -102
- package/esm/proxy/parse-proxy-response.js.map +0 -1
- package/esm/sdk/api.js +0 -69
- package/esm/sdk/api.js.map +0 -1
- package/esm/sdk/client.js +0 -52
- package/esm/sdk/client.js.map +0 -1
- package/esm/sdk/hub.js +0 -102
- package/esm/sdk/hub.js.map +0 -1
- package/esm/sdk/init.js +0 -221
- package/esm/sdk/init.js.map +0 -1
- package/esm/sdk/initOtel.js +0 -67
- package/esm/sdk/initOtel.js.map +0 -1
- package/esm/sdk/scope.js +0 -16
- package/esm/sdk/scope.js.map +0 -1
- package/esm/transports/http.js +0 -155
- package/esm/transports/http.js.map +0 -1
- package/esm/utils/addOriginToSpan.js +0 -9
- package/esm/utils/addOriginToSpan.js.map +0 -1
- package/esm/utils/errorhandling.js +0 -42
- package/esm/utils/errorhandling.js.map +0 -1
- package/esm/utils/getRequestUrl.js +0 -16
- package/esm/utils/getRequestUrl.js.map +0 -1
- package/esm/utils/module.js +0 -60
- package/esm/utils/module.js.map +0 -1
- package/types/integrations/local-variables/local-variables-async.d.ts +0 -14
- package/types/integrations/local-variables/local-variables-async.d.ts.map +0 -1
- package/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +0 -14
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
import { addOriginToSpan } from '../../utils/addOriginToSpan.js';
|
|
5
|
-
|
|
6
|
-
const _graphqlIntegration = (() => {
|
|
7
|
-
return {
|
|
8
|
-
name: 'Graphql',
|
|
9
|
-
setupOnce() {
|
|
10
|
-
registerInstrumentations({
|
|
11
|
-
instrumentations: [
|
|
12
|
-
new GraphQLInstrumentation({
|
|
13
|
-
ignoreTrivialResolveSpans: true,
|
|
14
|
-
responseHook(span) {
|
|
15
|
-
addOriginToSpan(span, 'auto.graphql.otel.graphql');
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
],
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}) ;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* GraphQL integration
|
|
26
|
-
*
|
|
27
|
-
* Capture tracing data for GraphQL.
|
|
28
|
-
*/
|
|
29
|
-
const graphqlIntegration = defineIntegration(_graphqlIntegration);
|
|
30
|
-
|
|
31
|
-
export { graphqlIntegration };
|
|
32
|
-
//# sourceMappingURL=graphql.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sources":["../../../../src/integrations/tracing/graphql.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _graphqlIntegration = (() => {\n return {\n name: 'Graphql',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [\n new GraphQLInstrumentation({\n ignoreTrivialResolveSpans: true,\n responseHook(span) {\n addOriginToSpan(span, 'auto.graphql.otel.graphql');\n },\n }),\n ],\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * GraphQL integration\n *\n * Capture tracing data for GraphQL.\n */\nexport const graphqlIntegration = defineIntegration(_graphqlIntegration);\n"],"names":[],"mappings":";;;;;AAOA,MAAM,mBAAoB,IAAG,MAAM;AACnC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,SAAS;AACnB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE;AAC1B,UAAU,IAAI,sBAAsB,CAAC;AACrC,YAAY,yBAAyB,EAAE,IAAI;AAC3C,YAAY,YAAY,CAAC,IAAI,EAAE;AAC/B,cAAc,eAAe,CAAC,IAAI,EAAE,2BAA2B,CAAC,CAAA;AAChE,aAAa;AACb,WAAW,CAAC;AACZ,SAAS;AACT,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,kBAAmB,GAAE,iBAAiB,CAAC,mBAAmB;;;;"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';
|
|
3
|
-
import { defineIntegration, SDK_VERSION, getActiveSpan, getRootSpan, captureException } from '@sentry/core';
|
|
4
|
-
|
|
5
|
-
const _hapiIntegration = (() => {
|
|
6
|
-
return {
|
|
7
|
-
name: 'Hapi',
|
|
8
|
-
setupOnce() {
|
|
9
|
-
registerInstrumentations({
|
|
10
|
-
instrumentations: [new HapiInstrumentation()],
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}) ;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Hapi integration
|
|
18
|
-
*
|
|
19
|
-
* Capture tracing data for Hapi.
|
|
20
|
-
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.
|
|
21
|
-
*/
|
|
22
|
-
const hapiIntegration = defineIntegration(_hapiIntegration);
|
|
23
|
-
|
|
24
|
-
function isBoomObject(response) {
|
|
25
|
-
return response && (response ).isBoom !== undefined;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function isErrorEvent(event) {
|
|
29
|
-
return event && (event ).error !== undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function sendErrorToSentry(errorData) {
|
|
33
|
-
captureException(errorData, {
|
|
34
|
-
mechanism: {
|
|
35
|
-
type: 'hapi',
|
|
36
|
-
handled: false,
|
|
37
|
-
data: {
|
|
38
|
-
function: 'hapiErrorPlugin',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const hapiErrorPlugin = {
|
|
45
|
-
name: 'SentryHapiErrorPlugin',
|
|
46
|
-
version: SDK_VERSION,
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
register: async function (serverArg) {
|
|
49
|
-
const server = serverArg ;
|
|
50
|
-
|
|
51
|
-
server.events.on('request', (request, event) => {
|
|
52
|
-
const activeSpan = getActiveSpan();
|
|
53
|
-
const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;
|
|
54
|
-
|
|
55
|
-
if (request.response && isBoomObject(request.response)) {
|
|
56
|
-
sendErrorToSentry(request.response);
|
|
57
|
-
} else if (isErrorEvent(event)) {
|
|
58
|
-
sendErrorToSentry(event.error);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (rootSpan) {
|
|
62
|
-
rootSpan.setStatus('internal_error');
|
|
63
|
-
rootSpan.end();
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Add a Hapi plugin to capture errors to Sentry.
|
|
71
|
-
*/
|
|
72
|
-
async function setupHapiErrorHandler(server) {
|
|
73
|
-
await server.register(hapiErrorPlugin);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { hapiErrorPlugin, hapiIntegration, setupHapiErrorHandler };
|
|
77
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';\nimport { SDK_VERSION, captureException, defineIntegration, getActiveSpan, getRootSpan } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\nimport type { Boom, RequestEvent, ResponseObject, Server } from './types';\n\nconst _hapiIntegration = (() => {\n return {\n name: 'Hapi',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [new HapiInstrumentation()],\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Hapi integration\n *\n * Capture tracing data for Hapi.\n * If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.\n */\nexport const hapiIntegration = defineIntegration(_hapiIntegration);\n\nfunction isBoomObject(response: ResponseObject | Boom): response is Boom {\n return response && (response as Boom).isBoom !== undefined;\n}\n\nfunction isErrorEvent(event: RequestEvent): event is RequestEvent {\n return event && (event as RequestEvent).error !== undefined;\n}\n\nfunction sendErrorToSentry(errorData: object): void {\n captureException(errorData, {\n mechanism: {\n type: 'hapi',\n handled: false,\n data: {\n function: 'hapiErrorPlugin',\n },\n },\n });\n}\n\nexport const hapiErrorPlugin = {\n name: 'SentryHapiErrorPlugin',\n version: SDK_VERSION,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register: async function (serverArg: Record<any, any>) {\n const server = serverArg as unknown as Server;\n\n server.events.on('request', (request, event) => {\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n if (request.response && isBoomObject(request.response)) {\n sendErrorToSentry(request.response);\n } else if (isErrorEvent(event)) {\n sendErrorToSentry(event.error);\n }\n\n if (rootSpan) {\n rootSpan.setStatus('internal_error');\n rootSpan.end();\n }\n });\n },\n};\n\n/**\n * Add a Hapi plugin to capture errors to Sentry.\n */\nexport async function setupHapiErrorHandler(server: Server): Promise<void> {\n await server.register(hapiErrorPlugin);\n}\n"],"names":[],"mappings":";;;;AAMA,MAAM,gBAAiB,IAAG,MAAM;AAChC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE,CAAC,IAAI,mBAAmB,EAAE,CAAC;AACrD,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;AACA;MACa,eAAgB,GAAE,iBAAiB,CAAC,gBAAgB,EAAC;AAClE;AACA,SAAS,YAAY,CAAC,QAAQ,EAA2C;AACzE,EAAE,OAAO,YAAY,CAAC,WAAkB,MAAO,KAAI,SAAS,CAAA;AAC5D,CAAA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAuC;AAClE,EAAE,OAAO,SAAS,CAAC,QAAuB,KAAM,KAAI,SAAS,CAAA;AAC7D,CAAA;AACA;AACA,SAAS,iBAAiB,CAAC,SAAS,EAAgB;AACpD,EAAE,gBAAgB,CAAC,SAAS,EAAE;AAC9B,IAAI,SAAS,EAAE;AACf,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,OAAO,EAAE,KAAK;AACpB,MAAM,IAAI,EAAE;AACZ,QAAQ,QAAQ,EAAE,iBAAiB;AACnC,OAAO;AACP,KAAK;AACL,GAAG,CAAC,CAAA;AACJ,CAAA;AACA;AACO,MAAM,kBAAkB;AAC/B,EAAE,IAAI,EAAE,uBAAuB;AAC/B,EAAE,OAAO,EAAE,WAAW;AACtB;AACA,EAAE,QAAQ,EAAE,gBAAgB,SAAS,EAAoB;AACzD,IAAI,MAAM,MAAO,GAAE,SAAU,EAAA;AAC7B;AACA,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK;AACpD,MAAM,MAAM,UAAA,GAAa,aAAa,EAAE,CAAA;AACxC,MAAM,MAAM,QAAS,GAAE,UAAW,GAAE,WAAW,CAAC,UAAU,CAAE,GAAE,SAAS,CAAA;AACvE;AACA,MAAM,IAAI,OAAO,CAAC,QAAS,IAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AAC9D,QAAQ,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC3C,OAAM,MAAO,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;AACtC,QAAQ,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACtC,OAAM;AACN;AACA,MAAM,IAAI,QAAQ,EAAE;AACpB,QAAQ,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAC5C,QAAQ,QAAQ,CAAC,GAAG,EAAE,CAAA;AACtB,OAAM;AACN,KAAK,CAAC,CAAA;AACN,GAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACO,eAAe,qBAAqB,CAAC,MAAM,EAAyB;AAC3E,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAA;AACxC;;;;"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { expressIntegration } from './express.js';
|
|
2
|
-
import { fastifyIntegration } from './fastify.js';
|
|
3
|
-
import { graphqlIntegration } from './graphql.js';
|
|
4
|
-
import { hapiIntegration } from './hapi/index.js';
|
|
5
|
-
import { koaIntegration } from './koa.js';
|
|
6
|
-
import { mongoIntegration } from './mongo.js';
|
|
7
|
-
import { mongooseIntegration } from './mongoose.js';
|
|
8
|
-
import { mysqlIntegration } from './mysql.js';
|
|
9
|
-
import { mysql2Integration } from './mysql2.js';
|
|
10
|
-
import { nestIntegration } from './nest.js';
|
|
11
|
-
import { postgresIntegration } from './postgres.js';
|
|
12
|
-
import { prismaIntegration } from './prisma.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
|
|
16
|
-
*/
|
|
17
|
-
function getAutoPerformanceIntegrations() {
|
|
18
|
-
return [
|
|
19
|
-
expressIntegration(),
|
|
20
|
-
fastifyIntegration(),
|
|
21
|
-
graphqlIntegration(),
|
|
22
|
-
mongoIntegration(),
|
|
23
|
-
mongooseIntegration(),
|
|
24
|
-
mysqlIntegration(),
|
|
25
|
-
mysql2Integration(),
|
|
26
|
-
postgresIntegration(),
|
|
27
|
-
prismaIntegration(),
|
|
28
|
-
nestIntegration(),
|
|
29
|
-
hapiIntegration(),
|
|
30
|
-
koaIntegration(),
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { getAutoPerformanceIntegrations };
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/integrations/tracing/index.ts"],"sourcesContent":["import type { Integration } from '@sentry/types';\n\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 { prismaIntegration } from './prisma';\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 postgresIntegration(),\n prismaIntegration(),\n nestIntegration(),\n hapiIntegration(),\n koaIntegration(),\n ];\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAeA;AACA;AACA;AACO,SAAS,8BAA8B,GAAkB;AAChE,EAAE,OAAO;AACT,IAAI,kBAAkB,EAAE;AACxB,IAAI,kBAAkB,EAAE;AACxB,IAAI,kBAAkB,EAAE;AACxB,IAAI,gBAAgB,EAAE;AACtB,IAAI,mBAAmB,EAAE;AACzB,IAAI,gBAAgB,EAAE;AACtB,IAAI,iBAAiB,EAAE;AACvB,IAAI,mBAAmB,EAAE;AACzB,IAAI,iBAAiB,EAAE;AACvB,IAAI,eAAe,EAAE;AACrB,IAAI,eAAe,EAAE;AACrB,IAAI,cAAc,EAAE;AACpB,GAAG,CAAA;AACH;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
|
|
5
|
-
const _koaIntegration = (() => {
|
|
6
|
-
return {
|
|
7
|
-
name: 'Koa',
|
|
8
|
-
setupOnce() {
|
|
9
|
-
registerInstrumentations({
|
|
10
|
-
instrumentations: [new KoaInstrumentation()],
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}) ;
|
|
15
|
-
|
|
16
|
-
const koaIntegration = defineIntegration(_koaIntegration);
|
|
17
|
-
|
|
18
|
-
export { koaIntegration };
|
|
19
|
-
//# sourceMappingURL=koa.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"koa.js","sources":["../../../../src/integrations/tracing/koa.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _koaIntegration = (() => {\n return {\n name: 'Koa',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [new KoaInstrumentation()],\n });\n },\n };\n}) satisfies IntegrationFn;\n\nexport const koaIntegration = defineIntegration(_koaIntegration);\n"],"names":[],"mappings":";;;;AAKA,MAAM,eAAgB,IAAG,MAAM;AAC/B,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE,CAAC,IAAI,kBAAkB,EAAE,CAAC;AACpD,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;MACa,cAAe,GAAE,iBAAiB,CAAC,eAAe;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
import { addOriginToSpan } from '../../utils/addOriginToSpan.js';
|
|
5
|
-
|
|
6
|
-
const _mongoIntegration = (() => {
|
|
7
|
-
return {
|
|
8
|
-
name: 'Mongo',
|
|
9
|
-
setupOnce() {
|
|
10
|
-
registerInstrumentations({
|
|
11
|
-
instrumentations: [
|
|
12
|
-
new MongoDBInstrumentation({
|
|
13
|
-
responseHook(span) {
|
|
14
|
-
addOriginToSpan(span, 'auto.db.otel.mongo');
|
|
15
|
-
},
|
|
16
|
-
}),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}) ;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* MongoDB integration
|
|
25
|
-
*
|
|
26
|
-
* Capture tracing data for MongoDB.
|
|
27
|
-
*/
|
|
28
|
-
const mongoIntegration = defineIntegration(_mongoIntegration);
|
|
29
|
-
|
|
30
|
-
export { mongoIntegration };
|
|
31
|
-
//# sourceMappingURL=mongo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mongo.js","sources":["../../../../src/integrations/tracing/mongo.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _mongoIntegration = (() => {\n return {\n name: 'Mongo',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [\n new MongoDBInstrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongo');\n },\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":[],"mappings":";;;;;AAOA,MAAM,iBAAkB,IAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE;AAC1B,UAAU,IAAI,sBAAsB,CAAC;AACrC,YAAY,YAAY,CAAC,IAAI,EAAE;AAC/B,cAAc,eAAe,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAA;AACzD,aAAa;AACb,WAAW,CAAC;AACZ,SAAS;AACT,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,gBAAiB,GAAE,iBAAiB,CAAC,iBAAiB;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { MongooseInstrumentation } from '@opentelemetry/instrumentation-mongoose';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
import { addOriginToSpan } from '../../utils/addOriginToSpan.js';
|
|
5
|
-
|
|
6
|
-
const _mongooseIntegration = (() => {
|
|
7
|
-
return {
|
|
8
|
-
name: 'Mongoose',
|
|
9
|
-
setupOnce() {
|
|
10
|
-
registerInstrumentations({
|
|
11
|
-
instrumentations: [
|
|
12
|
-
new MongooseInstrumentation({
|
|
13
|
-
responseHook(span) {
|
|
14
|
-
addOriginToSpan(span, 'auto.db.otel.mongoose');
|
|
15
|
-
},
|
|
16
|
-
}),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}) ;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Mongoose integration
|
|
25
|
-
*
|
|
26
|
-
* Capture tracing data for Mongoose.
|
|
27
|
-
*/
|
|
28
|
-
const mongooseIntegration = defineIntegration(_mongooseIntegration);
|
|
29
|
-
|
|
30
|
-
export { mongooseIntegration };
|
|
31
|
-
//# sourceMappingURL=mongoose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mongoose.js","sources":["../../../../src/integrations/tracing/mongoose.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { MongooseInstrumentation } from '@opentelemetry/instrumentation-mongoose';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _mongooseIntegration = (() => {\n return {\n name: 'Mongoose',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [\n new MongooseInstrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongoose');\n },\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":[],"mappings":";;;;;AAOA,MAAM,oBAAqB,IAAG,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,UAAU;AACpB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE;AAC1B,UAAU,IAAI,uBAAuB,CAAC;AACtC,YAAY,YAAY,CAAC,IAAI,EAAE;AAC/B,cAAc,eAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;AAC5D,aAAa;AACb,WAAW,CAAC;AACZ,SAAS;AACT,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,mBAAoB,GAAE,iBAAiB,CAAC,oBAAoB;;;;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
|
|
5
|
-
const _mysqlIntegration = (() => {
|
|
6
|
-
return {
|
|
7
|
-
name: 'Mysql',
|
|
8
|
-
setupOnce() {
|
|
9
|
-
registerInstrumentations({
|
|
10
|
-
instrumentations: [new MySQLInstrumentation({})],
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}) ;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* MySQL integration
|
|
18
|
-
*
|
|
19
|
-
* Capture tracing data for mysql.
|
|
20
|
-
*/
|
|
21
|
-
const mysqlIntegration = defineIntegration(_mysqlIntegration);
|
|
22
|
-
|
|
23
|
-
export { mysqlIntegration };
|
|
24
|
-
//# sourceMappingURL=mysql.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mysql.js","sources":["../../../../src/integrations/tracing/mysql.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _mysqlIntegration = (() => {\n return {\n name: 'Mysql',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [new MySQLInstrumentation({})],\n });\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":[],"mappings":";;;;AAKA,MAAM,iBAAkB,IAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE,CAAC,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAC;AACxD,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,gBAAiB,GAAE,iBAAiB,CAAC,iBAAiB;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
import { addOriginToSpan } from '../../utils/addOriginToSpan.js';
|
|
5
|
-
|
|
6
|
-
const _mysql2Integration = (() => {
|
|
7
|
-
return {
|
|
8
|
-
name: 'Mysql2',
|
|
9
|
-
setupOnce() {
|
|
10
|
-
registerInstrumentations({
|
|
11
|
-
instrumentations: [
|
|
12
|
-
new MySQL2Instrumentation({
|
|
13
|
-
responseHook(span) {
|
|
14
|
-
addOriginToSpan(span, 'auto.db.otel.mysql2');
|
|
15
|
-
},
|
|
16
|
-
}),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}) ;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* MySQL2 integration
|
|
25
|
-
*
|
|
26
|
-
* Capture tracing data for mysql2
|
|
27
|
-
*/
|
|
28
|
-
const mysql2Integration = defineIntegration(_mysql2Integration);
|
|
29
|
-
|
|
30
|
-
export { mysql2Integration };
|
|
31
|
-
//# sourceMappingURL=mysql2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mysql2.js","sources":["../../../../src/integrations/tracing/mysql2.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _mysql2Integration = (() => {\n return {\n name: 'Mysql2',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [\n new MySQL2Instrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mysql2');\n },\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":[],"mappings":";;;;;AAOA,MAAM,kBAAmB,IAAG,MAAM;AAClC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE;AAC1B,UAAU,IAAI,qBAAqB,CAAC;AACpC,YAAY,YAAY,CAAC,IAAI,EAAE;AAC/B,cAAc,eAAe,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAA;AAC1D,aAAa;AACb,WAAW,CAAC;AACZ,SAAS;AACT,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,iBAAkB,GAAE,iBAAiB,CAAC,kBAAkB;;;;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
|
|
5
|
-
const _nestIntegration = (() => {
|
|
6
|
-
return {
|
|
7
|
-
name: 'Nest',
|
|
8
|
-
setupOnce() {
|
|
9
|
-
registerInstrumentations({
|
|
10
|
-
instrumentations: [new NestInstrumentation({})],
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}) ;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Nest framework integration
|
|
18
|
-
*
|
|
19
|
-
* Capture tracing data for nest.
|
|
20
|
-
*/
|
|
21
|
-
const nestIntegration = defineIntegration(_nestIntegration);
|
|
22
|
-
|
|
23
|
-
export { nestIntegration };
|
|
24
|
-
//# sourceMappingURL=nest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nest.js","sources":["../../../../src/integrations/tracing/nest.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _nestIntegration = (() => {\n return {\n name: 'Nest',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [new NestInstrumentation({})],\n });\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"],"names":[],"mappings":";;;;AAKA,MAAM,gBAAiB,IAAG,MAAM;AAChC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE,CAAC,IAAI,mBAAmB,CAAC,EAAE,CAAC,CAAC;AACvD,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,eAAgB,GAAE,iBAAiB,CAAC,gBAAgB;;;;"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { PgInstrumentation } from '@opentelemetry/instrumentation-pg';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
import { addOriginToSpan } from '../../utils/addOriginToSpan.js';
|
|
5
|
-
|
|
6
|
-
const _postgresIntegration = (() => {
|
|
7
|
-
return {
|
|
8
|
-
name: 'Postgres',
|
|
9
|
-
setupOnce() {
|
|
10
|
-
registerInstrumentations({
|
|
11
|
-
instrumentations: [
|
|
12
|
-
new PgInstrumentation({
|
|
13
|
-
requireParentSpan: true,
|
|
14
|
-
requestHook(span) {
|
|
15
|
-
addOriginToSpan(span, 'auto.db.otel.postgres');
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
],
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}) ;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Postgres integration
|
|
26
|
-
*
|
|
27
|
-
* Capture tracing data for pg.
|
|
28
|
-
*/
|
|
29
|
-
const postgresIntegration = defineIntegration(_postgresIntegration);
|
|
30
|
-
|
|
31
|
-
export { postgresIntegration };
|
|
32
|
-
//# sourceMappingURL=postgres.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.js","sources":["../../../../src/integrations/tracing/postgres.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { PgInstrumentation } from '@opentelemetry/instrumentation-pg';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\nconst _postgresIntegration = (() => {\n return {\n name: 'Postgres',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [\n new PgInstrumentation({\n requireParentSpan: true,\n requestHook(span) {\n addOriginToSpan(span, 'auto.db.otel.postgres');\n },\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":[],"mappings":";;;;;AAOA,MAAM,oBAAqB,IAAG,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,UAAU;AACpB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE;AAC1B,UAAU,IAAI,iBAAiB,CAAC;AAChC,YAAY,iBAAiB,EAAE,IAAI;AACnC,YAAY,WAAW,CAAC,IAAI,EAAE;AAC9B,cAAc,eAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;AAC5D,aAAa;AACb,WAAW,CAAC;AACZ,SAAS;AACT,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,mBAAoB,GAAE,iBAAiB,CAAC,oBAAoB;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { PrismaInstrumentation } from '@prisma/instrumentation';
|
|
3
|
-
import { defineIntegration } from '@sentry/core';
|
|
4
|
-
|
|
5
|
-
const _prismaIntegration = (() => {
|
|
6
|
-
return {
|
|
7
|
-
name: 'Prisma',
|
|
8
|
-
setupOnce() {
|
|
9
|
-
registerInstrumentations({
|
|
10
|
-
instrumentations: [
|
|
11
|
-
// does not have a hook to adjust spans & add origin
|
|
12
|
-
new PrismaInstrumentation({}),
|
|
13
|
-
],
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
}) ;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Prisma integration
|
|
21
|
-
*
|
|
22
|
-
* Capture tracing data for prisma.
|
|
23
|
-
* Note: This requieres to set:
|
|
24
|
-
* previewFeatures = ["tracing"]
|
|
25
|
-
* For the prisma client.
|
|
26
|
-
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details.
|
|
27
|
-
*/
|
|
28
|
-
const prismaIntegration = defineIntegration(_prismaIntegration);
|
|
29
|
-
|
|
30
|
-
export { prismaIntegration };
|
|
31
|
-
//# sourceMappingURL=prisma.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.js","sources":["../../../../src/integrations/tracing/prisma.ts"],"sourcesContent":["import { registerInstrumentations } from '@opentelemetry/instrumentation';\nimport { PrismaInstrumentation } from '@prisma/instrumentation';\nimport { defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _prismaIntegration = (() => {\n return {\n name: 'Prisma',\n setupOnce() {\n registerInstrumentations({\n instrumentations: [\n // does not have a hook to adjust spans & add origin\n new PrismaInstrumentation({}),\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":[],"mappings":";;;;AAKA,MAAM,kBAAmB,IAAG,MAAM;AAClC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,SAAS,GAAG;AAChB,MAAM,wBAAwB,CAAC;AAC/B,QAAQ,gBAAgB,EAAE;AAC1B;AACA,UAAU,IAAI,qBAAqB,CAAC,EAAE,CAAC;AACvC,SAAS;AACT,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,iBAAkB,GAAE,iBAAiB,CAAC,kBAAkB;;;;"}
|
package/esm/nodeVersion.js
DELETED
package/esm/nodeVersion.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 {\n major: number | undefined;\n minor: number | undefined;\n};\nexport const NODE_MAJOR = NODE_VERSION.major || 0;\n"],"names":[],"mappings":";;AAEO,MAAM,YAAa,GAAE,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAE;;CAG/D;MACa,UAAW,GAAE,YAAY,CAAC,KAAA,IAAS;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
|
2
|
-
import { wrapContextManagerClass } from '@sentry/opentelemetry';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.
|
|
6
|
-
* It ensures that we create a new hub per context, so that the OTEL Context & the Sentry Hub are always in sync.
|
|
7
|
-
*
|
|
8
|
-
* Note that we currently only support AsyncHooks with this,
|
|
9
|
-
* but since this should work for Node 14+ anyhow that should be good enough.
|
|
10
|
-
*/
|
|
11
|
-
const SentryContextManager = wrapContextManagerClass(AsyncLocalStorageContextManager);
|
|
12
|
-
|
|
13
|
-
export { SentryContextManager };
|
|
14
|
-
//# sourceMappingURL=contextManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,oBAAqB,GAAE,uBAAuB,CAAC,+BAA+B;;;;"}
|
package/esm/proxy/base.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { _nullishCoalesce } from '@sentry/utils';
|
|
2
|
-
import * as http from 'http';
|
|
3
|
-
import 'https';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7
|
|
7
|
-
* With the following licence:
|
|
8
|
-
*
|
|
9
|
-
* (The MIT License)
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>*
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
-
* a copy of this software and associated documentation files (the
|
|
15
|
-
* 'Software'), to deal in the Software without restriction, including
|
|
16
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
-
* the following conditions:*
|
|
20
|
-
*
|
|
21
|
-
* The above copyright notice and this permission notice shall be
|
|
22
|
-
* included in all copies or substantial portions of the Software.*
|
|
23
|
-
*
|
|
24
|
-
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
27
|
-
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
28
|
-
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
29
|
-
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
30
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
const INTERNAL = Symbol('AgentBaseInternalState');
|
|
34
|
-
|
|
35
|
-
class Agent extends http.Agent {
|
|
36
|
-
|
|
37
|
-
// Set by `http.Agent` - missing from `@types/node`
|
|
38
|
-
|
|
39
|
-
constructor(opts) {
|
|
40
|
-
super(opts);
|
|
41
|
-
this[INTERNAL] = {};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Determine whether this is an `http` or `https` request.
|
|
46
|
-
*/
|
|
47
|
-
isSecureEndpoint(options) {
|
|
48
|
-
if (options) {
|
|
49
|
-
// First check the `secureEndpoint` property explicitly, since this
|
|
50
|
-
// means that a parent `Agent` is "passing through" to this instance.
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
52
|
-
if (typeof (options ).secureEndpoint === 'boolean') {
|
|
53
|
-
return options.secureEndpoint;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// If no explicit `secure` endpoint, check if `protocol` property is
|
|
57
|
-
// set. This will usually be the case since using a full string URL
|
|
58
|
-
// or `URL` instance should be the most common usage.
|
|
59
|
-
if (typeof options.protocol === 'string') {
|
|
60
|
-
return options.protocol === 'https:';
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Finally, if no `protocol` property was set, then fall back to
|
|
65
|
-
// checking the stack trace of the current call stack, and try to
|
|
66
|
-
// detect the "https" module.
|
|
67
|
-
const { stack } = new Error();
|
|
68
|
-
if (typeof stack !== 'string') return false;
|
|
69
|
-
return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
createSocket(req, options, cb) {
|
|
73
|
-
const connectOpts = {
|
|
74
|
-
...options,
|
|
75
|
-
secureEndpoint: this.isSecureEndpoint(options),
|
|
76
|
-
};
|
|
77
|
-
Promise.resolve()
|
|
78
|
-
.then(() => this.connect(req, connectOpts))
|
|
79
|
-
.then(socket => {
|
|
80
|
-
if (socket instanceof http.Agent) {
|
|
81
|
-
// @ts-expect-error `addRequest()` isn't defined in `@types/node`
|
|
82
|
-
return socket.addRequest(req, connectOpts);
|
|
83
|
-
}
|
|
84
|
-
this[INTERNAL].currentSocket = socket;
|
|
85
|
-
// @ts-expect-error `createSocket()` isn't defined in `@types/node`
|
|
86
|
-
super.createSocket(req, options, cb);
|
|
87
|
-
}, cb);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
createConnection() {
|
|
91
|
-
const socket = this[INTERNAL].currentSocket;
|
|
92
|
-
this[INTERNAL].currentSocket = undefined;
|
|
93
|
-
if (!socket) {
|
|
94
|
-
throw new Error('No socket was returned in the `connect()` function');
|
|
95
|
-
}
|
|
96
|
-
return socket;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
get defaultPort() {
|
|
100
|
-
return _nullishCoalesce(this[INTERNAL].defaultPort, () => ( (this.protocol === 'https:' ? 443 : 80)));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
set defaultPort(v) {
|
|
104
|
-
if (this[INTERNAL]) {
|
|
105
|
-
this[INTERNAL].defaultPort = v;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
get protocol() {
|
|
110
|
-
return _nullishCoalesce(this[INTERNAL].protocol, () => ( (this.isSecureEndpoint() ? 'https:' : 'http:')));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
set protocol(v) {
|
|
114
|
-
if (this[INTERNAL]) {
|
|
115
|
-
this[INTERNAL].protocol = v;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { Agent };
|
|
121
|
-
//# sourceMappingURL=base.js.map
|