@sentry/node 8.24.0 → 8.26.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/build/cjs/index.js +3 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/anr/index.js +1 -1
- package/build/cjs/integrations/fs.js +142 -0
- package/build/cjs/integrations/fs.js.map +1 -0
- package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/build/cjs/integrations/spotlight.js +5 -0
- package/build/cjs/integrations/spotlight.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql.js +31 -0
- package/build/cjs/integrations/tracing/graphql.js.map +1 -1
- package/build/cjs/integrations/tracing/nest/helpers.js.map +1 -1
- package/build/cjs/integrations/tracing/nest/sentry-nest-instrumentation.js +53 -3
- package/build/cjs/integrations/tracing/nest/sentry-nest-instrumentation.js.map +1 -1
- package/build/cjs/sdk/index.js +9 -21
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/esm/index.js +2 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/anr/index.js +1 -1
- package/build/esm/integrations/anr/worker-script.js +2 -2
- package/build/esm/integrations/fs.js +140 -0
- package/build/esm/integrations/fs.js.map +1 -0
- package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
- package/build/esm/integrations/local-variables/worker-script.js +1 -1
- package/build/esm/integrations/spotlight.js +5 -1
- package/build/esm/integrations/spotlight.js.map +1 -1
- package/build/esm/integrations/tracing/graphql.js +32 -1
- package/build/esm/integrations/tracing/graphql.js.map +1 -1
- package/build/esm/integrations/tracing/nest/helpers.js.map +1 -1
- package/build/esm/integrations/tracing/nest/sentry-nest-instrumentation.js +53 -3
- package/build/esm/integrations/tracing/nest/sentry-nest-instrumentation.js.map +1 -1
- package/build/esm/sdk/index.js +10 -22
- package/build/esm/sdk/index.js.map +1 -1
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/fs.d.ts +24 -0
- package/build/types/integrations/fs.d.ts.map +1 -0
- package/build/types/integrations/spotlight.d.ts +1 -0
- package/build/types/integrations/spotlight.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql.d.ts +15 -2
- package/build/types/integrations/tracing/graphql.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/helpers.d.ts +3 -3
- package/build/types/integrations/tracing/nest/helpers.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/sentry-nest-instrumentation.d.ts +8 -2
- package/build/types/integrations/tracing/nest/sentry-nest-instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/types.d.ts +11 -0
- package/build/types/integrations/tracing/nest/types.d.ts.map +1 -1
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +2 -1
- package/build/types-ts3.8/integrations/fs.d.ts +24 -0
- package/build/types-ts3.8/integrations/spotlight.d.ts +1 -0
- package/build/types-ts3.8/integrations/tracing/graphql.d.ts +15 -2
- package/build/types-ts3.8/integrations/tracing/nest/helpers.d.ts +3 -3
- package/build/types-ts3.8/integrations/tracing/nest/sentry-nest-instrumentation.d.ts +8 -2
- package/build/types-ts3.8/integrations/tracing/nest/types.d.ts +11 -0
- package/package.json +6 -5
|
@@ -27,7 +27,10 @@ class SentryNestInstrumentation extends InstrumentationBase {
|
|
|
27
27
|
init() {
|
|
28
28
|
const moduleDef = new InstrumentationNodeModuleDefinition(SentryNestInstrumentation.COMPONENT, supportedVersions);
|
|
29
29
|
|
|
30
|
-
moduleDef.files.push(
|
|
30
|
+
moduleDef.files.push(
|
|
31
|
+
this._getInjectableFileInstrumentation(supportedVersions),
|
|
32
|
+
this._getCatchFileInstrumentation(supportedVersions),
|
|
33
|
+
);
|
|
31
34
|
return moduleDef;
|
|
32
35
|
}
|
|
33
36
|
|
|
@@ -51,10 +54,28 @@ class SentryNestInstrumentation extends InstrumentationBase {
|
|
|
51
54
|
);
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Wraps the @Catch decorator.
|
|
59
|
+
*/
|
|
60
|
+
_getCatchFileInstrumentation(versions) {
|
|
61
|
+
return new InstrumentationNodeModuleFile(
|
|
62
|
+
'@nestjs/common/decorators/core/catch.decorator.js',
|
|
63
|
+
versions,
|
|
64
|
+
(moduleExports) => {
|
|
65
|
+
if (isWrapped(moduleExports.Catch)) {
|
|
66
|
+
this._unwrap(moduleExports, 'Catch');
|
|
67
|
+
}
|
|
68
|
+
this._wrap(moduleExports, 'Catch', this._createWrapCatch());
|
|
69
|
+
return moduleExports;
|
|
70
|
+
},
|
|
71
|
+
(moduleExports) => {
|
|
72
|
+
this._unwrap(moduleExports, 'Catch');
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
54
77
|
/**
|
|
55
78
|
* Creates a wrapper function for the @Injectable decorator.
|
|
56
|
-
*
|
|
57
|
-
* Wraps the use method to instrument nest class middleware.
|
|
58
79
|
*/
|
|
59
80
|
_createWrapInjectable() {
|
|
60
81
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -170,6 +191,35 @@ class SentryNestInstrumentation extends InstrumentationBase {
|
|
|
170
191
|
};
|
|
171
192
|
};
|
|
172
193
|
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Creates a wrapper function for the @Catch decorator. Used to instrument exception filters.
|
|
197
|
+
*/
|
|
198
|
+
_createWrapCatch() {
|
|
199
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
200
|
+
return function wrapCatch(original) {
|
|
201
|
+
return function wrappedCatch(...exceptions) {
|
|
202
|
+
return function (target) {
|
|
203
|
+
if (typeof target.prototype.catch === 'function' && !target.__SENTRY_INTERNAL__) {
|
|
204
|
+
// patch only once
|
|
205
|
+
if (isPatched(target)) {
|
|
206
|
+
return original(...exceptions)(target);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
target.prototype.catch = new Proxy(target.prototype.catch, {
|
|
210
|
+
apply: (originalCatch, thisArgCatch, argsCatch) => {
|
|
211
|
+
return startSpan(getMiddlewareSpanOptions(target), () => {
|
|
212
|
+
return originalCatch.apply(thisArgCatch, argsCatch);
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return original(...exceptions)(target);
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
}
|
|
173
223
|
} SentryNestInstrumentation.__initStatic(); SentryNestInstrumentation.__initStatic2();
|
|
174
224
|
|
|
175
225
|
export { SentryNestInstrumentation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry-nest-instrumentation.js","sources":["../../../../../src/integrations/tracing/nest/sentry-nest-instrumentation.ts"],"sourcesContent":["import { isWrapped } from '@opentelemetry/core';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n} from '@opentelemetry/instrumentation';\nimport { getActiveSpan, startSpan, startSpanManual, withActiveSpan } from '@sentry/core';\nimport type { Span } from '@sentry/types';\nimport { SDK_VERSION } from '@sentry/utils';\nimport { getMiddlewareSpanOptions, isPatched } from './helpers';\nimport type { InjectableTarget } from './types';\n\nconst supportedVersions = ['>=8.0.0 <11'];\n\n/**\n * Custom instrumentation for nestjs.\n *\n * This hooks into the @Injectable decorator, which is applied on class middleware, interceptors and guards.\n */\nexport class SentryNestInstrumentation extends InstrumentationBase {\n public static readonly COMPONENT = '@nestjs/common';\n public static readonly COMMON_ATTRIBUTES = {\n component: SentryNestInstrumentation.COMPONENT,\n };\n\n public constructor(config: InstrumentationConfig = {}) {\n super('sentry-nestjs', SDK_VERSION, config);\n }\n\n /**\n * Initializes the instrumentation by defining the modules to be patched.\n */\n public init(): InstrumentationNodeModuleDefinition {\n const moduleDef = new InstrumentationNodeModuleDefinition(SentryNestInstrumentation.COMPONENT, supportedVersions);\n\n moduleDef.files.push(this._getInjectableFileInstrumentation(supportedVersions));\n return moduleDef;\n }\n\n /**\n * Wraps the @Injectable decorator.\n */\n private _getInjectableFileInstrumentation(versions: string[]): InstrumentationNodeModuleFile {\n return new InstrumentationNodeModuleFile(\n '@nestjs/common/decorators/core/injectable.decorator.js',\n versions,\n (moduleExports: { Injectable: InjectableTarget }) => {\n if (isWrapped(moduleExports.Injectable)) {\n this._unwrap(moduleExports, 'Injectable');\n }\n this._wrap(moduleExports, 'Injectable', this._createWrapInjectable());\n return moduleExports;\n },\n (moduleExports: { Injectable: InjectableTarget }) => {\n this._unwrap(moduleExports, 'Injectable');\n },\n );\n }\n\n /**\n * Creates a wrapper function for the @Injectable decorator.\n *\n * Wraps the use method to instrument nest class middleware.\n */\n private _createWrapInjectable() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function wrapInjectable(original: any) {\n return function wrappedInjectable(options?: unknown) {\n return function (target: InjectableTarget) {\n // patch middleware\n if (typeof target.prototype.use === 'function' && !target.__SENTRY_INTERNAL__) {\n // patch only once\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.use = new Proxy(target.prototype.use, {\n apply: (originalUse, thisArgUse, argsUse) => {\n const [req, res, next, ...args] = argsUse;\n const prevSpan = getActiveSpan();\n\n return startSpanManual(getMiddlewareSpanOptions(target), (span: Span) => {\n const nextProxy = new Proxy(next, {\n apply: (originalNext, thisArgNext, argsNext) => {\n span.end();\n\n if (prevSpan) {\n return withActiveSpan(prevSpan, () => {\n return Reflect.apply(originalNext, thisArgNext, argsNext);\n });\n } else {\n return Reflect.apply(originalNext, thisArgNext, argsNext);\n }\n },\n });\n\n return originalUse.apply(thisArgUse, [req, res, nextProxy, args]);\n });\n },\n });\n }\n\n // patch guards\n if (typeof target.prototype.canActivate === 'function' && !target.__SENTRY_INTERNAL__) {\n // patch only once\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.canActivate = new Proxy(target.prototype.canActivate, {\n apply: (originalCanActivate, thisArgCanActivate, argsCanActivate) => {\n return startSpan(getMiddlewareSpanOptions(target), () => {\n return originalCanActivate.apply(thisArgCanActivate, argsCanActivate);\n });\n },\n });\n }\n\n // patch pipes\n if (typeof target.prototype.transform === 'function' && !target.__SENTRY_INTERNAL__) {\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.transform = new Proxy(target.prototype.transform, {\n apply: (originalTransform, thisArgTransform, argsTransform) => {\n return startSpan(getMiddlewareSpanOptions(target), () => {\n return originalTransform.apply(thisArgTransform, argsTransform);\n });\n },\n });\n }\n\n // patch interceptors\n if (typeof target.prototype.intercept === 'function' && !target.__SENTRY_INTERNAL__) {\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.intercept = new Proxy(target.prototype.intercept, {\n apply: (originalIntercept, thisArgIntercept, argsIntercept) => {\n const [executionContext, next, args] = argsIntercept;\n const prevSpan = getActiveSpan();\n\n return startSpanManual(getMiddlewareSpanOptions(target), (span: Span) => {\n const nextProxy = new Proxy(next, {\n get: (thisArgNext, property, receiver) => {\n if (property === 'handle') {\n const originalHandle = Reflect.get(thisArgNext, property, receiver);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (...args: any[]) => {\n span.end();\n\n if (prevSpan) {\n return withActiveSpan(prevSpan, () => {\n return Reflect.apply(originalHandle, thisArgNext, args);\n });\n } else {\n return Reflect.apply(originalHandle, thisArgNext, args);\n }\n };\n }\n\n return Reflect.get(target, property, receiver);\n },\n });\n\n return originalIntercept.apply(thisArgIntercept, [executionContext, nextProxy, args]);\n });\n },\n });\n }\n\n return original(options)(target);\n };\n };\n };\n }\n}\n"],"names":[],"mappings":";;;;;;AAaA,MAAM,iBAAkB,GAAE,CAAC,aAAa,CAAC,CAAA;AACzC;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,yBAA0B,SAAQ,mBAAoB,CAAA;AACnE,GAAS,QAAgB,YAAA,GAAA,CAAA,IAAA,CAAA,SAAA,GAAY,iBAAgB,CAAA;AACrD,GA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C,GAAG,IAAI,KAAY;AACnD,0BAA0B,IAAI,CAAC,GAAG,EAAE,CAAA;AACpC;AACA,0BAA0B,IAAI,QAAQ,EAAE;AACxC,4BAA4B,OAAO,cAAc,CAAC,QAAQ,EAAE,MAAM;AAClE,8BAA8B,OAAO,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,CAAC,CAAA;AACrF,6BAA6B,CAAC,CAAA;AAC9B,iCAAiC;AACjC,4BAA4B,OAAO,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,CAAC,CAAA;AACnF,2BAA0B;AAC1B,yBAAyB,CAAA;AACzB,uBAAsB;AACtB;AACA,sBAAsB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACpE,qBAAqB;AACrB,mBAAmB,CAAC,CAAA;AACpB;AACA,kBAAkB,OAAO,iBAAiB,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAA;AACvG,iBAAiB,CAAC,CAAA;AAClB,eAAe;AACf,aAAa,CAAC,CAAA;AACd,WAAU;AACV;AACA,UAAU,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAC1C,SAAS,CAAA;AACT,OAAO,CAAA;AACP,KAAK,CAAA;AACL,GAAE;AACF,CAAA,CAAA,yBAAA,CAAA,YAAA,EAAA,CAAA,CAAA,yBAAA,CAAA,aAAA,EAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"sentry-nest-instrumentation.js","sources":["../../../../../src/integrations/tracing/nest/sentry-nest-instrumentation.ts"],"sourcesContent":["import { isWrapped } from '@opentelemetry/core';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n} from '@opentelemetry/instrumentation';\nimport { getActiveSpan, startSpan, startSpanManual, withActiveSpan } from '@sentry/core';\nimport type { Span } from '@sentry/types';\nimport { SDK_VERSION } from '@sentry/utils';\nimport { getMiddlewareSpanOptions, isPatched } from './helpers';\nimport type { CatchTarget, InjectableTarget } from './types';\n\nconst supportedVersions = ['>=8.0.0 <11'];\n\n/**\n * Custom instrumentation for nestjs.\n *\n * This hooks into the @Injectable decorator, which is applied on class middleware, interceptors and guards.\n */\nexport class SentryNestInstrumentation extends InstrumentationBase {\n public static readonly COMPONENT = '@nestjs/common';\n public static readonly COMMON_ATTRIBUTES = {\n component: SentryNestInstrumentation.COMPONENT,\n };\n\n public constructor(config: InstrumentationConfig = {}) {\n super('sentry-nestjs', SDK_VERSION, config);\n }\n\n /**\n * Initializes the instrumentation by defining the modules to be patched.\n */\n public init(): InstrumentationNodeModuleDefinition {\n const moduleDef = new InstrumentationNodeModuleDefinition(SentryNestInstrumentation.COMPONENT, supportedVersions);\n\n moduleDef.files.push(\n this._getInjectableFileInstrumentation(supportedVersions),\n this._getCatchFileInstrumentation(supportedVersions),\n );\n return moduleDef;\n }\n\n /**\n * Wraps the @Injectable decorator.\n */\n private _getInjectableFileInstrumentation(versions: string[]): InstrumentationNodeModuleFile {\n return new InstrumentationNodeModuleFile(\n '@nestjs/common/decorators/core/injectable.decorator.js',\n versions,\n (moduleExports: { Injectable: InjectableTarget }) => {\n if (isWrapped(moduleExports.Injectable)) {\n this._unwrap(moduleExports, 'Injectable');\n }\n this._wrap(moduleExports, 'Injectable', this._createWrapInjectable());\n return moduleExports;\n },\n (moduleExports: { Injectable: InjectableTarget }) => {\n this._unwrap(moduleExports, 'Injectable');\n },\n );\n }\n\n /**\n * Wraps the @Catch decorator.\n */\n private _getCatchFileInstrumentation(versions: string[]): InstrumentationNodeModuleFile {\n return new InstrumentationNodeModuleFile(\n '@nestjs/common/decorators/core/catch.decorator.js',\n versions,\n (moduleExports: { Catch: CatchTarget }) => {\n if (isWrapped(moduleExports.Catch)) {\n this._unwrap(moduleExports, 'Catch');\n }\n this._wrap(moduleExports, 'Catch', this._createWrapCatch());\n return moduleExports;\n },\n (moduleExports: { Catch: CatchTarget }) => {\n this._unwrap(moduleExports, 'Catch');\n },\n );\n }\n\n /**\n * Creates a wrapper function for the @Injectable decorator.\n */\n private _createWrapInjectable() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function wrapInjectable(original: any) {\n return function wrappedInjectable(options?: unknown) {\n return function (target: InjectableTarget) {\n // patch middleware\n if (typeof target.prototype.use === 'function' && !target.__SENTRY_INTERNAL__) {\n // patch only once\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.use = new Proxy(target.prototype.use, {\n apply: (originalUse, thisArgUse, argsUse) => {\n const [req, res, next, ...args] = argsUse;\n const prevSpan = getActiveSpan();\n\n return startSpanManual(getMiddlewareSpanOptions(target), (span: Span) => {\n const nextProxy = new Proxy(next, {\n apply: (originalNext, thisArgNext, argsNext) => {\n span.end();\n\n if (prevSpan) {\n return withActiveSpan(prevSpan, () => {\n return Reflect.apply(originalNext, thisArgNext, argsNext);\n });\n } else {\n return Reflect.apply(originalNext, thisArgNext, argsNext);\n }\n },\n });\n\n return originalUse.apply(thisArgUse, [req, res, nextProxy, args]);\n });\n },\n });\n }\n\n // patch guards\n if (typeof target.prototype.canActivate === 'function' && !target.__SENTRY_INTERNAL__) {\n // patch only once\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.canActivate = new Proxy(target.prototype.canActivate, {\n apply: (originalCanActivate, thisArgCanActivate, argsCanActivate) => {\n return startSpan(getMiddlewareSpanOptions(target), () => {\n return originalCanActivate.apply(thisArgCanActivate, argsCanActivate);\n });\n },\n });\n }\n\n // patch pipes\n if (typeof target.prototype.transform === 'function' && !target.__SENTRY_INTERNAL__) {\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.transform = new Proxy(target.prototype.transform, {\n apply: (originalTransform, thisArgTransform, argsTransform) => {\n return startSpan(getMiddlewareSpanOptions(target), () => {\n return originalTransform.apply(thisArgTransform, argsTransform);\n });\n },\n });\n }\n\n // patch interceptors\n if (typeof target.prototype.intercept === 'function' && !target.__SENTRY_INTERNAL__) {\n if (isPatched(target)) {\n return original(options)(target);\n }\n\n target.prototype.intercept = new Proxy(target.prototype.intercept, {\n apply: (originalIntercept, thisArgIntercept, argsIntercept) => {\n const [executionContext, next, args] = argsIntercept;\n const prevSpan = getActiveSpan();\n\n return startSpanManual(getMiddlewareSpanOptions(target), (span: Span) => {\n const nextProxy = new Proxy(next, {\n get: (thisArgNext, property, receiver) => {\n if (property === 'handle') {\n const originalHandle = Reflect.get(thisArgNext, property, receiver);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (...args: any[]) => {\n span.end();\n\n if (prevSpan) {\n return withActiveSpan(prevSpan, () => {\n return Reflect.apply(originalHandle, thisArgNext, args);\n });\n } else {\n return Reflect.apply(originalHandle, thisArgNext, args);\n }\n };\n }\n\n return Reflect.get(target, property, receiver);\n },\n });\n\n return originalIntercept.apply(thisArgIntercept, [executionContext, nextProxy, args]);\n });\n },\n });\n }\n\n return original(options)(target);\n };\n };\n };\n }\n\n /**\n * Creates a wrapper function for the @Catch decorator. Used to instrument exception filters.\n */\n private _createWrapCatch() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function wrapCatch(original: any) {\n return function wrappedCatch(...exceptions: unknown[]) {\n return function (target: CatchTarget) {\n if (typeof target.prototype.catch === 'function' && !target.__SENTRY_INTERNAL__) {\n // patch only once\n if (isPatched(target)) {\n return original(...exceptions)(target);\n }\n\n target.prototype.catch = new Proxy(target.prototype.catch, {\n apply: (originalCatch, thisArgCatch, argsCatch) => {\n return startSpan(getMiddlewareSpanOptions(target), () => {\n return originalCatch.apply(thisArgCatch, argsCatch);\n });\n },\n });\n }\n\n return original(...exceptions)(target);\n };\n };\n };\n }\n}\n"],"names":[],"mappings":";;;;;;AAaA,MAAM,iBAAkB,GAAE,CAAC,aAAa,CAAC,CAAA;AACzC;AACA;A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aAAa,CAAC,CAAA;AACd,WAAU;AACV;AACA,UAAU,OAAO,QAAQ,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAChD,SAAS,CAAA;AACT,OAAO,CAAA;AACP,KAAK,CAAA;AACL,GAAE;AACF,CAAA,CAAA,yBAAA,CAAA,YAAA,EAAA,CAAA,CAAA,yBAAA,CAAA,aAAA,EAAA;;;;"}
|
package/build/esm/sdk/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { modulesIntegration } from '../integrations/modules.js';
|
|
|
11
11
|
import { nativeNodeFetchIntegration } from '../integrations/node-fetch.js';
|
|
12
12
|
import { onUncaughtExceptionIntegration } from '../integrations/onuncaughtexception.js';
|
|
13
13
|
import { onUnhandledRejectionIntegration } from '../integrations/onunhandledrejection.js';
|
|
14
|
-
import { spotlightIntegration } from '../integrations/spotlight.js';
|
|
14
|
+
import { INTEGRATION_NAME, spotlightIntegration } from '../integrations/spotlight.js';
|
|
15
15
|
import { getAutoPerformanceIntegrations } from '../integrations/tracing/index.js';
|
|
16
16
|
import { makeNodeTransport } from '../transports/http.js';
|
|
17
17
|
import { isCjs } from '../utils/commonjs.js';
|
|
@@ -114,13 +114,19 @@ function _init(
|
|
|
114
114
|
const scope = getCurrentScope();
|
|
115
115
|
scope.update(options.initialScope);
|
|
116
116
|
|
|
117
|
+
if (options.spotlight && !options.integrations.some(({ name }) => name === INTEGRATION_NAME)) {
|
|
118
|
+
options.integrations.push(
|
|
119
|
+
spotlightIntegration({
|
|
120
|
+
sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined,
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
117
125
|
const client = new NodeClient(options);
|
|
118
126
|
// The client is on the current scope, from where it generally is inherited
|
|
119
127
|
getCurrentScope().setClient(client);
|
|
120
128
|
|
|
121
|
-
|
|
122
|
-
client.init();
|
|
123
|
-
}
|
|
129
|
+
client.init();
|
|
124
130
|
|
|
125
131
|
logger.log(`Running in ${isCjs() ? 'CommonJS' : 'ESM'} mode.`);
|
|
126
132
|
|
|
@@ -132,20 +138,6 @@ function _init(
|
|
|
132
138
|
|
|
133
139
|
updateScopeFromEnvVariables();
|
|
134
140
|
|
|
135
|
-
if (options.spotlight) {
|
|
136
|
-
// force integrations to be setup even if no DSN was set
|
|
137
|
-
// If they have already been added before, they will be ignored anyhow
|
|
138
|
-
const integrations = client.getOptions().integrations;
|
|
139
|
-
for (const integration of integrations) {
|
|
140
|
-
client.addIntegration(integration);
|
|
141
|
-
}
|
|
142
|
-
client.addIntegration(
|
|
143
|
-
spotlightIntegration({
|
|
144
|
-
sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined,
|
|
145
|
-
}),
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
141
|
// If users opt-out of this, they _have_ to set up OpenTelemetry themselves
|
|
150
142
|
// There is no way to use this SDK without OpenTelemetry!
|
|
151
143
|
if (!options.skipOpenTelemetrySetup) {
|
|
@@ -311,9 +303,5 @@ function startSessionTracking() {
|
|
|
311
303
|
});
|
|
312
304
|
}
|
|
313
305
|
|
|
314
|
-
function isEnabled(client) {
|
|
315
|
-
return client.getOptions().enabled !== false && client.getTransport() !== undefined;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
306
|
export { getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, init, initWithoutDefaultIntegrations, validateOpenTelemetrySetup };
|
|
319
307
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/sdk/index.ts"],"sourcesContent":["import {\n endSession,\n functionToStringIntegration,\n getClient,\n getCurrentScope,\n getIntegrationsToSetup,\n getIsolationScope,\n hasTracingEnabled,\n inboundFiltersIntegration,\n linkedErrorsIntegration,\n requestDataIntegration,\n startSession,\n} from '@sentry/core';\nimport {\n enhanceDscWithOpenTelemetryRootSpanName,\n openTelemetrySetupCheck,\n setOpenTelemetryContextAsyncContextStrategy,\n setupEventContextTrace,\n} from '@sentry/opentelemetry';\nimport type { Client, Integration, Options } from '@sentry/types';\nimport {\n consoleSandbox,\n dropUndefinedKeys,\n logger,\n propagationContextFromHeaders,\n stackParserFromStackParserOptions,\n} from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { consoleIntegration } from '../integrations/console';\nimport { nodeContextIntegration } from '../integrations/context';\nimport { contextLinesIntegration } from '../integrations/contextlines';\n\nimport { httpIntegration } from '../integrations/http';\nimport { localVariablesIntegration } from '../integrations/local-variables';\nimport { modulesIntegration } from '../integrations/modules';\nimport { nativeNodeFetchIntegration } from '../integrations/node-fetch';\nimport { onUncaughtExceptionIntegration } from '../integrations/onuncaughtexception';\nimport { onUnhandledRejectionIntegration } from '../integrations/onunhandledrejection';\nimport { spotlightIntegration } from '../integrations/spotlight';\nimport { getAutoPerformanceIntegrations } from '../integrations/tracing';\nimport { makeNodeTransport } from '../transports';\nimport type { NodeClientOptions, NodeOptions } from '../types';\nimport { isCjs } from '../utils/commonjs';\nimport { defaultStackParser, getSentryRelease } from './api';\nimport { NodeClient } from './client';\nimport { initOpenTelemetry, maybeInitializeEsmLoader } from './initOtel';\n\nfunction getCjsOnlyIntegrations(): Integration[] {\n return isCjs() ? [modulesIntegration()] : [];\n}\n\n/**\n * Get default integrations, excluding performance.\n */\nexport function getDefaultIntegrationsWithoutPerformance(): Integration[] {\n return [\n // Common\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n linkedErrorsIntegration(),\n requestDataIntegration(),\n // Native Wrappers\n consoleIntegration(),\n httpIntegration(),\n nativeNodeFetchIntegration(),\n // Global Handlers\n onUncaughtExceptionIntegration(),\n onUnhandledRejectionIntegration(),\n // Event Info\n contextLinesIntegration(),\n localVariablesIntegration(),\n nodeContextIntegration(),\n ...getCjsOnlyIntegrations(),\n ];\n}\n\n/** Get the default integrations for the Node SDK. */\nexport function getDefaultIntegrations(options: Options): Integration[] {\n return [\n ...getDefaultIntegrationsWithoutPerformance(),\n // We only add performance integrations if tracing is enabled\n // Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added\n // This means that generally request isolation will work (because that is done by httpIntegration)\n // But `transactionName` will not be set automatically\n ...(shouldAddPerformanceIntegrations(options) ? getAutoPerformanceIntegrations() : []),\n ];\n}\n\nfunction shouldAddPerformanceIntegrations(options: Options): boolean {\n if (!hasTracingEnabled(options)) {\n return false;\n }\n\n // We want to ensure `tracesSampleRate` is not just undefined/null here\n // eslint-disable-next-line deprecation/deprecation\n return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options;\n}\n\n/**\n * Initialize Sentry for Node.\n */\nexport function init(options: NodeOptions | undefined = {}): NodeClient | undefined {\n return _init(options, getDefaultIntegrations);\n}\n\n/**\n * Initialize Sentry for Node, without any integrations added by default.\n */\nexport function initWithoutDefaultIntegrations(options: NodeOptions | undefined = {}): NodeClient {\n return _init(options, () => []);\n}\n\n/**\n * Initialize Sentry for Node, without performance instrumentation.\n */\nfunction _init(\n _options: NodeOptions | undefined = {},\n getDefaultIntegrationsImpl: (options: Options) => Integration[],\n): NodeClient {\n const options = getClientOptions(_options, getDefaultIntegrationsImpl);\n\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n\n if (!isCjs() && options.registerEsmLoaderHooks !== false) {\n maybeInitializeEsmLoader(options.registerEsmLoaderHooks === true ? undefined : options.registerEsmLoaderHooks);\n }\n\n setOpenTelemetryContextAsyncContextStrategy();\n\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new NodeClient(options);\n // The client is on the current scope, from where it generally is inherited\n getCurrentScope().setClient(client);\n\n if (isEnabled(client)) {\n client.init();\n }\n\n logger.log(`Running in ${isCjs() ? 'CommonJS' : 'ESM'} mode.`);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n\n client.startClientReportTracking();\n\n updateScopeFromEnvVariables();\n\n if (options.spotlight) {\n // force integrations to be setup even if no DSN was set\n // If they have already been added before, they will be ignored anyhow\n const integrations = client.getOptions().integrations;\n for (const integration of integrations) {\n client.addIntegration(integration);\n }\n client.addIntegration(\n spotlightIntegration({\n sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined,\n }),\n );\n }\n\n // If users opt-out of this, they _have_ to set up OpenTelemetry themselves\n // There is no way to use this SDK without OpenTelemetry!\n if (!options.skipOpenTelemetrySetup) {\n initOpenTelemetry(client);\n validateOpenTelemetrySetup();\n }\n\n enhanceDscWithOpenTelemetryRootSpanName(client);\n setupEventContextTrace(client);\n\n return client;\n}\n\n/**\n * Validate that your OpenTelemetry setup is correct.\n */\nexport function validateOpenTelemetrySetup(): void {\n if (!DEBUG_BUILD) {\n return;\n }\n\n const setup = openTelemetrySetupCheck();\n\n const required: ReturnType<typeof openTelemetrySetupCheck> = ['SentryContextManager', 'SentryPropagator'];\n\n if (hasTracingEnabled()) {\n required.push('SentrySpanProcessor');\n }\n\n for (const k of required) {\n if (!setup.includes(k)) {\n logger.error(\n `You have to set up the ${k}. Without this, the OpenTelemetry & Sentry integration will not work properly.`,\n );\n }\n }\n\n if (!setup.includes('SentrySampler')) {\n logger.warn(\n 'You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.',\n );\n }\n}\n\nfunction getClientOptions(\n options: NodeOptions,\n getDefaultIntegrationsImpl: (options: Options) => Integration[],\n): NodeClientOptions {\n const release = getRelease(options.release);\n\n const autoSessionTracking =\n typeof release !== 'string'\n ? false\n : options.autoSessionTracking === undefined\n ? true\n : options.autoSessionTracking;\n\n const tracesSampleRate = getTracesSampleRate(options.tracesSampleRate);\n\n const baseOptions = dropUndefinedKeys({\n transport: makeNodeTransport,\n dsn: process.env.SENTRY_DSN,\n environment: process.env.SENTRY_ENVIRONMENT,\n sendClientReports: true,\n });\n\n const overwriteOptions = dropUndefinedKeys({\n release,\n autoSessionTracking,\n tracesSampleRate,\n });\n\n const mergedOptions = {\n ...baseOptions,\n ...options,\n ...overwriteOptions,\n };\n\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = getDefaultIntegrationsImpl(mergedOptions);\n }\n\n const clientOptions: NodeClientOptions = {\n ...mergedOptions,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup({\n defaultIntegrations: options.defaultIntegrations,\n integrations: options.integrations,\n }),\n };\n\n return clientOptions;\n}\n\nfunction getRelease(release: NodeOptions['release']): string | undefined {\n if (release !== undefined) {\n return release;\n }\n\n const detectedRelease = getSentryRelease();\n if (detectedRelease !== undefined) {\n return detectedRelease;\n }\n\n return undefined;\n}\n\nfunction getTracesSampleRate(tracesSampleRate: NodeOptions['tracesSampleRate']): number | undefined {\n if (tracesSampleRate !== undefined) {\n return tracesSampleRate;\n }\n\n const sampleRateFromEnv = process.env.SENTRY_TRACES_SAMPLE_RATE;\n if (!sampleRateFromEnv) {\n return undefined;\n }\n\n const parsed = parseFloat(sampleRateFromEnv);\n return isFinite(parsed) ? parsed : undefined;\n}\n\n/**\n * Update scope and propagation context based on environmental variables.\n *\n * See https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md\n * for more details.\n */\nfunction updateScopeFromEnvVariables(): void {\n const sentryUseEnvironment = (process.env.SENTRY_USE_ENVIRONMENT || '').toLowerCase();\n if (!['false', 'n', 'no', 'off', '0'].includes(sentryUseEnvironment)) {\n const sentryTraceEnv = process.env.SENTRY_TRACE;\n const baggageEnv = process.env.SENTRY_BAGGAGE;\n const propagationContext = propagationContextFromHeaders(sentryTraceEnv, baggageEnv);\n getCurrentScope().setPropagationContext(propagationContext);\n }\n}\n\n/**\n * Enable automatic Session Tracking for the node process.\n */\nfunction startSessionTracking(): void {\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n client.initSessionFlusher();\n }\n\n startSession();\n\n // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because\n // The 'beforeExit' event is not emitted for conditions causing explicit termination,\n // such as calling process.exit() or uncaught exceptions.\n // Ref: https://nodejs.org/api/process.html#process_event_beforeexit\n process.on('beforeExit', () => {\n const session = getIsolationScope().getSession();\n\n // Only call endSession, if the Session exists on Scope and SessionStatus is not a\n // Terminal Status i.e. Exited or Crashed because\n // \"When a session is moved away from ok it must not be updated anymore.\"\n // Ref: https://develop.sentry.dev/sdk/sessions/\n if (session && session.status !== 'ok') {\n endSession();\n }\n });\n}\n\nfunction isEnabled(client: Client): boolean {\n return client.getOptions().enabled !== false && client.getTransport() !== undefined;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+CA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK,EAAC,GAAI,CAAC,kBAAkB,EAAE,CAAA,GAAI,EAAE,CAAA;AAC9C,CAAA;AACA;AACA;AACA;AACA;AACO,SAAS,wCAAwC,GAAkB;AAC1E,EAAE,OAAO;AACT;AACA,IAAI,yBAAyB,EAAE;AAC/B,IAAI,2BAA2B,EAAE;AACjC,IAAI,uBAAuB,EAAE;AAC7B,IAAI,sBAAsB,EAAE;AAC5B;AACA,IAAI,kBAAkB,EAAE;AACxB,IAAI,eAAe,EAAE;AACrB,IAAI,0BAA0B,EAAE;AAChC;AACA,IAAI,8BAA8B,EAAE;AACpC,IAAI,+BAA+B,EAAE;AACrC;AACA,IAAI,uBAAuB,EAAE;AAC7B,IAAI,yBAAyB,EAAE;AAC/B,IAAI,sBAAsB,EAAE;AAC5B,IAAI,GAAG,sBAAsB,EAAE;AAC/B,GAAG,CAAA;AACH,CAAA;AACA;AACA;AACO,SAAS,sBAAsB,CAAC,OAAO,EAA0B;AACxE,EAAE,OAAO;AACT,IAAI,G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G,CAAC,cAAc,CAAA;AACjD,IAAI,MAAM,qBAAqB,6BAA6B,CAAC,cAAc,EAAE,UAAU,CAAC,CAAA;AACxF,IAAI,eAAe,EAAE,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAA;AAC/D,GAAE;AACF,CAAA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,GAAS;AACtC,EAAE,MAAM,MAAA,GAAS,SAAS,EAAc,CAAA;AACxC,EAAE,IAAI,MAAA,IAAU,MAAM,CAAC,UAAU,EAAE,CAAC,mBAAmB,EAAE;AACzD,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAA;AAC/B,GAAE;AACF;AACA,EAAE,YAAY,EAAE,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM;AACjC,IAAI,MAAM,UAAU,iBAAiB,EAAE,CAAC,UAAU,EAAE,CAAA;AACpD;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,OAAQ,IAAG,OAAO,CAAC,MAAA,KAAW,IAAI,EAAE;AAC5C,MAAM,UAAU,EAAE,CAAA;AAClB,KAAI;AACJ,GAAG,CAAC,CAAA;AACJ,CAAA;AACA;AACA,SAAS,SAAS,CAAC,MAAM,EAAmB;AAC5C,EAAE,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC,OAAA,KAAY,KAAA,IAAS,MAAM,CAAC,YAAY,EAAC,KAAM,SAAS,CAAA;AACrF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/sdk/index.ts"],"sourcesContent":["import {\n endSession,\n functionToStringIntegration,\n getClient,\n getCurrentScope,\n getIntegrationsToSetup,\n getIsolationScope,\n hasTracingEnabled,\n inboundFiltersIntegration,\n linkedErrorsIntegration,\n requestDataIntegration,\n startSession,\n} from '@sentry/core';\nimport {\n enhanceDscWithOpenTelemetryRootSpanName,\n openTelemetrySetupCheck,\n setOpenTelemetryContextAsyncContextStrategy,\n setupEventContextTrace,\n} from '@sentry/opentelemetry';\nimport type { Integration, Options } from '@sentry/types';\nimport {\n consoleSandbox,\n dropUndefinedKeys,\n logger,\n propagationContextFromHeaders,\n stackParserFromStackParserOptions,\n} from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { consoleIntegration } from '../integrations/console';\nimport { nodeContextIntegration } from '../integrations/context';\nimport { contextLinesIntegration } from '../integrations/contextlines';\n\nimport { httpIntegration } from '../integrations/http';\nimport { localVariablesIntegration } from '../integrations/local-variables';\nimport { modulesIntegration } from '../integrations/modules';\nimport { nativeNodeFetchIntegration } from '../integrations/node-fetch';\nimport { onUncaughtExceptionIntegration } from '../integrations/onuncaughtexception';\nimport { onUnhandledRejectionIntegration } from '../integrations/onunhandledrejection';\nimport { INTEGRATION_NAME as SPOTLIGHT_INTEGRATION_NAME, spotlightIntegration } from '../integrations/spotlight';\nimport { getAutoPerformanceIntegrations } from '../integrations/tracing';\nimport { makeNodeTransport } from '../transports';\nimport type { NodeClientOptions, NodeOptions } from '../types';\nimport { isCjs } from '../utils/commonjs';\nimport { defaultStackParser, getSentryRelease } from './api';\nimport { NodeClient } from './client';\nimport { initOpenTelemetry, maybeInitializeEsmLoader } from './initOtel';\n\nfunction getCjsOnlyIntegrations(): Integration[] {\n return isCjs() ? [modulesIntegration()] : [];\n}\n\n/**\n * Get default integrations, excluding performance.\n */\nexport function getDefaultIntegrationsWithoutPerformance(): Integration[] {\n return [\n // Common\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n linkedErrorsIntegration(),\n requestDataIntegration(),\n // Native Wrappers\n consoleIntegration(),\n httpIntegration(),\n nativeNodeFetchIntegration(),\n // Global Handlers\n onUncaughtExceptionIntegration(),\n onUnhandledRejectionIntegration(),\n // Event Info\n contextLinesIntegration(),\n localVariablesIntegration(),\n nodeContextIntegration(),\n ...getCjsOnlyIntegrations(),\n ];\n}\n\n/** Get the default integrations for the Node SDK. */\nexport function getDefaultIntegrations(options: Options): Integration[] {\n return [\n ...getDefaultIntegrationsWithoutPerformance(),\n // We only add performance integrations if tracing is enabled\n // Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added\n // This means that generally request isolation will work (because that is done by httpIntegration)\n // But `transactionName` will not be set automatically\n ...(shouldAddPerformanceIntegrations(options) ? getAutoPerformanceIntegrations() : []),\n ];\n}\n\nfunction shouldAddPerformanceIntegrations(options: Options): boolean {\n if (!hasTracingEnabled(options)) {\n return false;\n }\n\n // We want to ensure `tracesSampleRate` is not just undefined/null here\n // eslint-disable-next-line deprecation/deprecation\n return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options;\n}\n\n/**\n * Initialize Sentry for Node.\n */\nexport function init(options: NodeOptions | undefined = {}): NodeClient | undefined {\n return _init(options, getDefaultIntegrations);\n}\n\n/**\n * Initialize Sentry for Node, without any integrations added by default.\n */\nexport function initWithoutDefaultIntegrations(options: NodeOptions | undefined = {}): NodeClient {\n return _init(options, () => []);\n}\n\n/**\n * Initialize Sentry for Node, without performance instrumentation.\n */\nfunction _init(\n _options: NodeOptions | undefined = {},\n getDefaultIntegrationsImpl: (options: Options) => Integration[],\n): NodeClient {\n const options = getClientOptions(_options, getDefaultIntegrationsImpl);\n\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n\n if (!isCjs() && options.registerEsmLoaderHooks !== false) {\n maybeInitializeEsmLoader(options.registerEsmLoaderHooks === true ? undefined : options.registerEsmLoaderHooks);\n }\n\n setOpenTelemetryContextAsyncContextStrategy();\n\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n if (options.spotlight && !options.integrations.some(({ name }) => name === SPOTLIGHT_INTEGRATION_NAME)) {\n options.integrations.push(\n spotlightIntegration({\n sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined,\n }),\n );\n }\n\n const client = new NodeClient(options);\n // The client is on the current scope, from where it generally is inherited\n getCurrentScope().setClient(client);\n\n client.init();\n\n logger.log(`Running in ${isCjs() ? 'CommonJS' : 'ESM'} mode.`);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n\n client.startClientReportTracking();\n\n updateScopeFromEnvVariables();\n\n // If users opt-out of this, they _have_ to set up OpenTelemetry themselves\n // There is no way to use this SDK without OpenTelemetry!\n if (!options.skipOpenTelemetrySetup) {\n initOpenTelemetry(client);\n validateOpenTelemetrySetup();\n }\n\n enhanceDscWithOpenTelemetryRootSpanName(client);\n setupEventContextTrace(client);\n\n return client;\n}\n\n/**\n * Validate that your OpenTelemetry setup is correct.\n */\nexport function validateOpenTelemetrySetup(): void {\n if (!DEBUG_BUILD) {\n return;\n }\n\n const setup = openTelemetrySetupCheck();\n\n const required: ReturnType<typeof openTelemetrySetupCheck> = ['SentryContextManager', 'SentryPropagator'];\n\n if (hasTracingEnabled()) {\n required.push('SentrySpanProcessor');\n }\n\n for (const k of required) {\n if (!setup.includes(k)) {\n logger.error(\n `You have to set up the ${k}. Without this, the OpenTelemetry & Sentry integration will not work properly.`,\n );\n }\n }\n\n if (!setup.includes('SentrySampler')) {\n logger.warn(\n 'You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.',\n );\n }\n}\n\nfunction getClientOptions(\n options: NodeOptions,\n getDefaultIntegrationsImpl: (options: Options) => Integration[],\n): NodeClientOptions {\n const release = getRelease(options.release);\n\n const autoSessionTracking =\n typeof release !== 'string'\n ? false\n : options.autoSessionTracking === undefined\n ? true\n : options.autoSessionTracking;\n\n const tracesSampleRate = getTracesSampleRate(options.tracesSampleRate);\n\n const baseOptions = dropUndefinedKeys({\n transport: makeNodeTransport,\n dsn: process.env.SENTRY_DSN,\n environment: process.env.SENTRY_ENVIRONMENT,\n sendClientReports: true,\n });\n\n const overwriteOptions = dropUndefinedKeys({\n release,\n autoSessionTracking,\n tracesSampleRate,\n });\n\n const mergedOptions = {\n ...baseOptions,\n ...options,\n ...overwriteOptions,\n };\n\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = getDefaultIntegrationsImpl(mergedOptions);\n }\n\n const clientOptions: NodeClientOptions = {\n ...mergedOptions,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup({\n defaultIntegrations: options.defaultIntegrations,\n integrations: options.integrations,\n }),\n };\n\n return clientOptions;\n}\n\nfunction getRelease(release: NodeOptions['release']): string | undefined {\n if (release !== undefined) {\n return release;\n }\n\n const detectedRelease = getSentryRelease();\n if (detectedRelease !== undefined) {\n return detectedRelease;\n }\n\n return undefined;\n}\n\nfunction getTracesSampleRate(tracesSampleRate: NodeOptions['tracesSampleRate']): number | undefined {\n if (tracesSampleRate !== undefined) {\n return tracesSampleRate;\n }\n\n const sampleRateFromEnv = process.env.SENTRY_TRACES_SAMPLE_RATE;\n if (!sampleRateFromEnv) {\n return undefined;\n }\n\n const parsed = parseFloat(sampleRateFromEnv);\n return isFinite(parsed) ? parsed : undefined;\n}\n\n/**\n * Update scope and propagation context based on environmental variables.\n *\n * See https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md\n * for more details.\n */\nfunction updateScopeFromEnvVariables(): void {\n const sentryUseEnvironment = (process.env.SENTRY_USE_ENVIRONMENT || '').toLowerCase();\n if (!['false', 'n', 'no', 'off', '0'].includes(sentryUseEnvironment)) {\n const sentryTraceEnv = process.env.SENTRY_TRACE;\n const baggageEnv = process.env.SENTRY_BAGGAGE;\n const propagationContext = propagationContextFromHeaders(sentryTraceEnv, baggageEnv);\n getCurrentScope().setPropagationContext(propagationContext);\n }\n}\n\n/**\n * Enable automatic Session Tracking for the node process.\n */\nfunction startSessionTracking(): void {\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n client.initSessionFlusher();\n }\n\n startSession();\n\n // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because\n // The 'beforeExit' event is not emitted for conditions causing explicit termination,\n // such as calling process.exit() or uncaught exceptions.\n // Ref: https://nodejs.org/api/process.html#process_event_beforeexit\n process.on('beforeExit', () => {\n const session = getIsolationScope().getSession();\n\n // Only call endSession, if the Session exists on Scope and SessionStatus is not a\n // Terminal Status i.e. Exited or Crashed because\n // \"When a session is moved away from ok it must not be updated anymore.\"\n // Ref: https://develop.sentry.dev/sdk/sessions/\n if (session && session.status !== 'ok') {\n endSession();\n }\n });\n}\n"],"names":["SPOTLIGHT_INTEGRATION_NAME"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+CA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK,EAAC,GAAI,CAAC,kBAAkB,EAAE,CAAA,GAAI,EAAE,CAAA;AAC9C,CAAA;AACA;AACA;AACA;AACA;AACO,SAAS,wCAAwC,GAAkB;AAC1E,EAAE,OAAO;AACT;AACA,IAAI,yBAAyB,EAAE;AAC/B,IAAI,2BAA2B,EAAE;AACjC,IAAI,uBAAuB,EAAE;AAC7B,IAAI,sBAAsB,EAAE;AAC5B;AACA,IAAI,kBAAkB,EAAE;AACxB,IAAI,eAAe,EAAE;AACrB,IAAI,0BAA0B,EAAE;AAChC;AACA,IAAI,8BAA8B,EAAE;AACpC,IAAI,+BAA+B,EAAE;AACrC;AACA,IAAI,uBAAuB,EAAE;AAC7B,IAAI,yBAAyB,EAAE;AAC/B,IAAI,sBAAsB,EAAE;AAC5B,IAAI,GAAG,sBAAsB,EAAE;AAC/B,GAAG,CAAA;AACH,CAAA;AACA;AACA;AACO,SAAS,sBAAsB,CAAC,OAAO,EAA0B;AACxE,EAAE,OAAO;AACT,IAAI,GAAG,wCAAwC,EAAE;AACjD;AACA;AACA;AACA;AACA,IAAI,IAAI,gCAAgC,CAAC,OAAO,CAAA,GAAI,8BAA8B,EAAC,GAAI,EA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GAAS,SAAS,EAAc,CAAA;AACxC,EAAE,IAAI,MAAA,IAAU,MAAM,CAAC,UAAU,EAAE,CAAC,mBAAmB,EAAE;AACzD,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAA;AAC/B,GAAE;AACF;AACA,EAAE,YAAY,EAAE,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM;AACjC,IAAI,MAAM,UAAU,iBAAiB,EAAE,CAAC,UAAU,EAAE,CAAA;AACpD;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,OAAQ,IAAG,OAAO,CAAC,MAAA,KAAW,IAAI,EAAE;AAC5C,MAAM,UAAU,EAAE,CAAA;AAClB,KAAI;AACJ,GAAG,CAAC,CAAA;AACJ;;;;"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { httpIntegration } from './integrations/http';
|
|
2
2
|
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
|
|
3
|
+
export { fsIntegration } from './integrations/fs';
|
|
3
4
|
export { consoleIntegration } from './integrations/console';
|
|
4
5
|
export { nodeContextIntegration } from './integrations/context';
|
|
5
6
|
export { contextLinesIntegration } from './integrations/contextlines';
|
|
@@ -36,6 +37,6 @@ export { cron } from './cron';
|
|
|
36
37
|
export type { NodeOptions } from './types';
|
|
37
38
|
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
|
|
38
39
|
export { addOpenTelemetryInstrumentation, continueTrace, setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
39
|
-
export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, getTraceData, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, zodErrorsIntegration, } from '@sentry/core';
|
|
40
|
+
export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, zodErrorsIntegration, } from '@sentry/core';
|
|
40
41
|
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
|
|
41
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MA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ClB,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,OAAO,EACP,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,IAAI,GACL,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This integration will create spans for `fs` API operations, like reading and writing files.
|
|
3
|
+
*
|
|
4
|
+
* **WARNING:** This integration may add significant overhead to your application. Especially in scenarios with a lot of
|
|
5
|
+
* file I/O, like for example when running a framework dev server, including this integration can massively slow down
|
|
6
|
+
* your application.
|
|
7
|
+
*
|
|
8
|
+
* @param options Configuration for this integration.
|
|
9
|
+
*/
|
|
10
|
+
export declare const fsIntegration: (options?: {
|
|
11
|
+
/**
|
|
12
|
+
* Setting this option to `true` will include any filepath arguments from your `fs` API calls as span attributes.
|
|
13
|
+
*
|
|
14
|
+
* Defaults to `false`.
|
|
15
|
+
*/
|
|
16
|
+
recordFilePaths?: boolean | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Setting this option to `true` will include the error messages of failed `fs` API calls as a span attribute.
|
|
19
|
+
*
|
|
20
|
+
* Defaults to `false`.
|
|
21
|
+
*/
|
|
22
|
+
recordErrorMessagesAsSpanAttributes?: boolean | undefined;
|
|
23
|
+
} | undefined) => import("@sentry/types").Integration;
|
|
24
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/integrations/fs.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;IAGpB;;;;OAIG;;IAGH;;;;OAIG;;qDAiER,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../src/integrations/spotlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAKlC,KAAK,0BAA0B,GAAG;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../src/integrations/spotlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAKlC,KAAK,0BAA0B,GAAG;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAkB5C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,oGAA2C,CAAC;AA+D7E,KAAK,eAAe,GAAG,OAAO,IAAI,CAAC,OAAO,CAAC;AAG3C;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,eAAe,CAOtD"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
interface GraphqlOptions {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Do not create spans for resolvers.
|
|
4
|
+
*
|
|
5
|
+
* Defaults to true.
|
|
6
|
+
*/
|
|
3
7
|
ignoreResolveSpans?: boolean;
|
|
4
8
|
/**
|
|
5
9
|
* Don't create spans for the execution of the default resolver on object properties.
|
|
@@ -8,8 +12,17 @@ interface GraphqlOptions {
|
|
|
8
12
|
* use the default resolver which just looks for a property with that name on the object.
|
|
9
13
|
* If the property is not a function, it's not very interesting to trace.
|
|
10
14
|
* This option can reduce noise and number of spans created.
|
|
15
|
+
*
|
|
16
|
+
* Defaults to true.
|
|
17
|
+
*/
|
|
18
|
+
ignoreTrivialResolveSpans?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.
|
|
21
|
+
* Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.
|
|
22
|
+
*
|
|
23
|
+
* Defaults to true.
|
|
11
24
|
*/
|
|
12
|
-
|
|
25
|
+
useOperationNameForRootSpan?: boolean;
|
|
13
26
|
}
|
|
14
27
|
export declare const instrumentGraphql: ((options?: GraphqlOptions | undefined) => void) & {
|
|
15
28
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAQA,UAAU,cAAc;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAID,eAAO,MAAM,iBAAiB;;CA8C7B,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+EAAyC,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { InjectableTarget } from './types';
|
|
1
|
+
import type { CatchTarget, InjectableTarget } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Helper checking if a concrete target class is already patched.
|
|
4
4
|
*
|
|
5
5
|
* We already guard duplicate patching with isWrapped. However, isWrapped checks whether a file has been patched, whereas we use this check for concrete target classes.
|
|
6
6
|
* This check might not be necessary, but better to play it safe.
|
|
7
7
|
*/
|
|
8
|
-
export declare function isPatched(target: InjectableTarget): boolean;
|
|
8
|
+
export declare function isPatched(target: InjectableTarget | CatchTarget): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Returns span options for nest middleware spans.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getMiddlewareSpanOptions(target: InjectableTarget): {
|
|
12
|
+
export declare function getMiddlewareSpanOptions(target: InjectableTarget | CatchTarget): {
|
|
13
13
|
name: string;
|
|
14
14
|
attributes: {
|
|
15
15
|
"sentry.op": string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAI7D;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,GAAG,OAAO,CAOzE;AAED;;GAEG;AAEH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW;;;;;;EAQ9E"}
|
|
@@ -19,11 +19,17 @@ export declare class SentryNestInstrumentation extends InstrumentationBase {
|
|
|
19
19
|
* Wraps the @Injectable decorator.
|
|
20
20
|
*/
|
|
21
21
|
private _getInjectableFileInstrumentation;
|
|
22
|
+
/**
|
|
23
|
+
* Wraps the @Catch decorator.
|
|
24
|
+
*/
|
|
25
|
+
private _getCatchFileInstrumentation;
|
|
22
26
|
/**
|
|
23
27
|
* Creates a wrapper function for the @Injectable decorator.
|
|
24
|
-
*
|
|
25
|
-
* Wraps the use method to instrument nest class middleware.
|
|
26
28
|
*/
|
|
27
29
|
private _createWrapInjectable;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a wrapper function for the @Catch decorator. Used to instrument exception filters.
|
|
32
|
+
*/
|
|
33
|
+
private _createWrapCatch;
|
|
28
34
|
}
|
|
29
35
|
//# sourceMappingURL=sentry-nest-instrumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry-nest-instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/sentry-nest-instrumentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EAEpC,MAAM,gCAAgC,CAAC;AASxC;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB;IAChE,gBAAuB,SAAS,oBAAoB;IACpD,gBAAuB,iBAAiB;;MAEtC;gBAEiB,MAAM,GAAE,qBAA0B;IAIrD;;OAEG;IACI,IAAI,IAAI,mCAAmC;
|
|
1
|
+
{"version":3,"file":"sentry-nest-instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/sentry-nest-instrumentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EAEpC,MAAM,gCAAgC,CAAC;AASxC;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB;IAChE,gBAAuB,SAAS,oBAAoB;IACpD,gBAAuB,iBAAiB;;MAEtC;gBAEiB,MAAM,GAAE,qBAA0B;IAIrD;;OAEG;IACI,IAAI,IAAI,mCAAmC;IAUlD;;OAEG;IACH,OAAO,CAAC,iCAAiC;IAiBzC;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAiBpC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAmH7B;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAyBzB"}
|
|
@@ -46,5 +46,16 @@ export interface InjectableTarget {
|
|
|
46
46
|
intercept?: (context: unknown, next: CallHandler, ...args: any[]) => Observable<any>;
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Represents a target class in NestJS annotated with @Catch.
|
|
51
|
+
*/
|
|
52
|
+
export interface CatchTarget {
|
|
53
|
+
name: string;
|
|
54
|
+
sentryPatched?: boolean;
|
|
55
|
+
__SENTRY_INTERNAL__?: boolean;
|
|
56
|
+
prototype: {
|
|
57
|
+
catch?: (...args: any[]) => any;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
49
60
|
export {};
|
|
50
61
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/types.ts"],"names":[],"mappings":"AAEA,UAAU,6BAA6B;IACrC,OAAO,EAAE,MAAM,MAAM,CAAC;IAEtB,YAAY,EAAE,MAAM;QAIlB,UAAU,EAAE,MAAM;YAChB,KAAK,CAAC,EAAE;gBACN,IAAI,CAAC,EAAE,MAAM,CAAC;aACf,CAAC;YACF,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,qBAAqB,EAAE,CAAC,WAAW,EAAE;QACnC,SAAS,EAAE,CAAC,OAAO,EAAE,6BAA6B,EAAE,IAAI,EAAE;YAAE,MAAM,EAAE,MAAM,GAAG,CAAA;SAAE,KAAK,GAAG,CAAC;KACzF,KAAK,IAAI,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE;QACT,GAAG,CA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|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAsB1D,OAAO,KAAK,EAAqB,WAAW,EAAE,MAAM,UAAU,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOtC;;GAEG;AACH,wBAAgB,wCAAwC,IAAI,WAAW,EAAE,CAoBxE;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAStE;AAYD;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAElF;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,CAEhG;AAqED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CA0BjD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { httpIntegration } from './integrations/http';
|
|
2
2
|
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
|
|
3
|
+
export { fsIntegration } from './integrations/fs';
|
|
3
4
|
export { consoleIntegration } from './integrations/console';
|
|
4
5
|
export { nodeContextIntegration } from './integrations/context';
|
|
5
6
|
export { contextLinesIntegration } from './integrations/contextlines';
|
|
@@ -36,6 +37,6 @@ export { cron } from './cron';
|
|
|
36
37
|
export { NodeOptions } from './types';
|
|
37
38
|
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
|
|
38
39
|
export { addOpenTelemetryInstrumentation, continueTrace, setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
39
|
-
export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, getTraceData, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, zodErrorsIntegration, } from '@sentry/core';
|
|
40
|
+
export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, zodErrorsIntegration, } from '@sentry/core';
|
|
40
41
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
|
|
41
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This integration will create spans for `fs` API operations, like reading and writing files.
|
|
3
|
+
*
|
|
4
|
+
* **WARNING:** This integration may add significant overhead to your application. Especially in scenarios with a lot of
|
|
5
|
+
* file I/O, like for example when running a framework dev server, including this integration can massively slow down
|
|
6
|
+
* your application.
|
|
7
|
+
*
|
|
8
|
+
* @param options Configuration for this integration.
|
|
9
|
+
*/
|
|
10
|
+
export declare const fsIntegration: (options?: {
|
|
11
|
+
/**
|
|
12
|
+
* Setting this option to `true` will include any filepath arguments from your `fs` API calls as span attributes.
|
|
13
|
+
*
|
|
14
|
+
* Defaults to `false`.
|
|
15
|
+
*/
|
|
16
|
+
recordFilePaths?: boolean | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Setting this option to `true` will include the error messages of failed `fs` API calls as a span attribute.
|
|
19
|
+
*
|
|
20
|
+
* Defaults to `false`.
|
|
21
|
+
*/
|
|
22
|
+
recordErrorMessagesAsSpanAttributes?: boolean | undefined;
|
|
23
|
+
} | undefined) => import("@sentry/types").Integration;
|
|
24
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
interface GraphqlOptions {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Do not create spans for resolvers.
|
|
4
|
+
*
|
|
5
|
+
* Defaults to true.
|
|
6
|
+
*/
|
|
3
7
|
ignoreResolveSpans?: boolean;
|
|
4
8
|
/**
|
|
5
9
|
* Don't create spans for the execution of the default resolver on object properties.
|
|
@@ -8,8 +12,17 @@ interface GraphqlOptions {
|
|
|
8
12
|
* use the default resolver which just looks for a property with that name on the object.
|
|
9
13
|
* If the property is not a function, it's not very interesting to trace.
|
|
10
14
|
* This option can reduce noise and number of spans created.
|
|
15
|
+
*
|
|
16
|
+
* Defaults to true.
|
|
17
|
+
*/
|
|
18
|
+
ignoreTrivialResolveSpans?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.
|
|
21
|
+
* Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.
|
|
22
|
+
*
|
|
23
|
+
* Defaults to true.
|
|
11
24
|
*/
|
|
12
|
-
|
|
25
|
+
useOperationNameForRootSpan?: boolean;
|
|
13
26
|
}
|
|
14
27
|
export declare const instrumentGraphql: ((options?: GraphqlOptions | undefined) => void) & {
|
|
15
28
|
id: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { InjectableTarget } from './types';
|
|
1
|
+
import { CatchTarget, InjectableTarget } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Helper checking if a concrete target class is already patched.
|
|
4
4
|
*
|
|
5
5
|
* We already guard duplicate patching with isWrapped. However, isWrapped checks whether a file has been patched, whereas we use this check for concrete target classes.
|
|
6
6
|
* This check might not be necessary, but better to play it safe.
|
|
7
7
|
*/
|
|
8
|
-
export declare function isPatched(target: InjectableTarget): boolean;
|
|
8
|
+
export declare function isPatched(target: InjectableTarget | CatchTarget): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Returns span options for nest middleware spans.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getMiddlewareSpanOptions(target: InjectableTarget): {
|
|
12
|
+
export declare function getMiddlewareSpanOptions(target: InjectableTarget | CatchTarget): {
|
|
13
13
|
name: string;
|
|
14
14
|
attributes: {
|
|
15
15
|
"sentry.op": string;
|