@sentry/node 8.39.0-beta.0 → 8.39.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 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/anr/index.js +1 -1
- package/build/cjs/integrations/anr/index.js.map +1 -1
- package/build/cjs/integrations/{processThread.js → childProcess.js} +11 -4
- package/build/cjs/integrations/childProcess.js.map +1 -0
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +1 -1
- package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/build/cjs/integrations/local-variables/local-variables-async.js.map +1 -1
- package/build/cjs/integrations/tracing/nest/helpers.js +17 -0
- package/build/cjs/integrations/tracing/nest/helpers.js.map +1 -1
- package/build/cjs/integrations/tracing/nest/nest.js +6 -0
- package/build/cjs/integrations/tracing/nest/nest.js.map +1 -1
- package/build/cjs/integrations/tracing/nest/sentry-nest-event-instrumentation.js +118 -0
- package/build/cjs/integrations/tracing/nest/sentry-nest-event-instrumentation.js.map +1 -0
- package/build/cjs/sdk/index.js +2 -2
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/integrations/anr/index.js +1 -1
- package/build/esm/integrations/anr/index.js.map +1 -1
- package/build/esm/integrations/anr/worker-script.js +2 -2
- package/build/esm/integrations/{processThread.js → childProcess.js} +11 -5
- package/build/esm/integrations/childProcess.js.map +1 -0
- package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +1 -1
- package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
- package/build/esm/integrations/local-variables/local-variables-async.js.map +1 -1
- package/build/esm/integrations/local-variables/worker-script.js +2 -2
- package/build/esm/integrations/tracing/nest/helpers.js +17 -1
- package/build/esm/integrations/tracing/nest/helpers.js.map +1 -1
- package/build/esm/integrations/tracing/nest/nest.js +6 -0
- package/build/esm/integrations/tracing/nest/nest.js.map +1 -1
- package/build/esm/integrations/tracing/nest/sentry-nest-event-instrumentation.js +116 -0
- package/build/esm/integrations/tracing/nest/sentry-nest-event-instrumentation.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js +2 -2
- package/build/esm/sdk/index.js.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/childProcess.d.ts +20 -0
- package/build/types/integrations/childProcess.d.ts.map +1 -0
- package/build/types/integrations/tracing/nest/helpers.d.ts +8 -0
- package/build/types/integrations/tracing/nest/helpers.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/nest.d.ts.map +1 -1
- package/build/types/integrations/tracing/nest/sentry-nest-event-instrumentation.d.ts +27 -0
- package/build/types/integrations/tracing/nest/sentry-nest-event-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/nest/types.d.ts +8 -0
- package/build/types/integrations/tracing/nest/types.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +2 -2
- package/build/types-ts3.8/integrations/childProcess.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/nest/helpers.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/nest/sentry-nest-event-instrumentation.d.ts +27 -0
- package/build/types-ts3.8/integrations/tracing/nest/types.d.ts +8 -0
- package/package.json +5 -5
- package/build/cjs/integrations/processThread.js.map +0 -1
- package/build/esm/integrations/processThread.js.map +0 -1
- package/build/types/integrations/processThread.d.ts +0 -14
- package/build/types/integrations/processThread.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/processThread.d.ts +0 -14
|
@@ -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 { 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 { processThreadBreadcrumbIntegration } from '../integrations/processThread';\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 { envToBool } from '../utils/envToBool';\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 processThreadBreadcrumbIntegration(),\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 if (options.spotlight == null) {\n const spotlightEnv = envToBool(process.env.SENTRY_SPOTLIGHT, { strict: true });\n if (spotlightEnv == null) {\n options.spotlight = process.env.SENTRY_SPOTLIGHT;\n } else {\n options.spotlight = spotlightEnv;\n }\n }\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 if (envToBool(process.env.SENTRY_USE_ENVIRONMENT) !== false) {\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":";;;;;;;;;;;;;;;;;;;;;;;AAiDA,SAAS,sBAAsB,GAAkB;AACjD,EAAE,OAAO,KAAK,EAAC,GAAI,CAAC,kBAAkB,EAAE,CAAA,GAAI,EAAE;AAC9C;;AAEA;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,kCAAkC,E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;AACA;AACA,EAAE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM;AACjC,IAAI,MAAM,UAAU,iBAAiB,EAAE,CAAC,UAAU,EAAE;;AAEpD;AACA;AACA;AACA;AACA,IAAI,IAAI,OAAQ,IAAG,OAAO,CAAC,MAAA,KAAW,IAAI,EAAE;AAC5C,MAAM,UAAU,EAAE;AAClB;AACA,GAAG,CAAC;AACJ;;;;"}
|
|
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 { childProcessIntegration } from '../integrations/childProcess';\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 { envToBool } from '../utils/envToBool';\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 childProcessIntegration(),\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 if (options.spotlight == null) {\n const spotlightEnv = envToBool(process.env.SENTRY_SPOTLIGHT, { strict: true });\n if (spotlightEnv == null) {\n options.spotlight = process.env.SENTRY_SPOTLIGHT;\n } else {\n options.spotlight = spotlightEnv;\n }\n }\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 if (envToBool(process.env.SENTRY_USE_ENVIRONMENT) !== false) {\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":";;;;;;;;;;;;;;;;;;;;;;;AAiDA,SAAS,sBAAsB,GAAkB;AACjD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AC/D,IAAI,MAAM,cAAe,GAAE,OAAO,CAAC,GAAG,CAAC,YAAY;AACnD,IAAI,MAAM,UAAW,GAAE,OAAO,CAAC,GAAG,CAAC,cAAc;AACjD,IAAI,MAAM,qBAAqB,6BAA6B,CAAC,cAAc,EAAE,UAAU,CAAC;AACxF,IAAI,eAAe,EAAE,CAAC,qBAAqB,CAAC,kBAAkB,CAAC;AAC/D;AACA;;AAEA;AACA;AACA;AACA,SAAS,oBAAoB,GAAS;AACtC,EAAE,MAAM,MAAA,GAAS,SAAS,EAAc;AACxC,EAAE,IAAI,MAAA,IAAU,MAAM,CAAC,UAAU,EAAE,CAAC,mBAAmB,EAAE;AACzD,IAAI,MAAM,CAAC,kBAAkB,EAAE;AAC/B;;AAEA,EAAE,YAAY,EAAE;;AAEhB;AACA;AACA;AACA;AACA,EAAE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM;AACjC,IAAI,MAAM,UAAU,iBAAiB,EAAE,CAAC,UAAU,EAAE;;AAEpD;AACA;AACA;AACA;AACA,IAAI,IAAI,OAAQ,IAAG,OAAO,CAAC,MAAA,KAAW,IAAI,EAAE;AAC5C,MAAM,UAAU,EAAE;AAClB;AACA,GAAG,CAAC;AACJ;;;;"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export { tediousIntegration } from './integrations/tracing/tedious';
|
|
|
31
31
|
export { genericPoolIntegration } from './integrations/tracing/genericPool';
|
|
32
32
|
export { dataloaderIntegration } from './integrations/tracing/dataloader';
|
|
33
33
|
export { amqplibIntegration } from './integrations/tracing/amqplib';
|
|
34
|
-
export { processThreadBreadcrumbIntegration } from './integrations/
|
|
34
|
+
export { processThreadBreadcrumbIntegration, childProcessIntegration } from './integrations/childProcess';
|
|
35
35
|
export { SentryContextManager } from './otel/contextManager';
|
|
36
36
|
export { generateInstrumentOnce } from './otel/instrument';
|
|
37
37
|
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, validateOpenTelemetrySetup, } from './sdk';
|
|
@@ -46,5 +46,5 @@ export type { NodeOptions } from './types';
|
|
|
46
46
|
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
|
|
47
47
|
export { addOpenTelemetryInstrumentation, continueTrace, setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
48
48
|
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, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, zodErrorsIntegration, profiler, } from '@sentry/core';
|
|
49
|
-
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
|
|
49
|
+
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
|
|
50
50
|
//# 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;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,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AA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AK,EACL,WAAW,EACX,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,SAAS,EAET,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EAExB,cAAc,IAAI,OAAO,EACzB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAElB,OAAO,EACP,gBAAgB,EAChB,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,20 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to include child process arguments in breadcrumbs data.
|
|
4
|
+
*
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
includeChildProcessArgs?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Capture breadcrumbs for child processes and worker threads.
|
|
11
|
+
*/
|
|
12
|
+
export declare const childProcessIntegration: (options?: Options | undefined) => import("@sentry/types").Integration;
|
|
13
|
+
/**
|
|
14
|
+
* Capture breadcrumbs for child processes and worker threads.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Use `childProcessIntegration` integration instead. Functionally they are the same. `processThreadBreadcrumbIntegration` will be removed in the next major version.
|
|
17
|
+
*/
|
|
18
|
+
export declare const processThreadBreadcrumbIntegration: (options?: Options | undefined) => import("@sentry/types").Integration;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=childProcess.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childProcess.d.ts","sourceRoot":"","sources":["../../../src/integrations/childProcess.ts"],"names":[],"mappings":"AAKA,UAAU,OAAO;IACf;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAKD;;GAEG;AACH,eAAO,MAAM,uBAAuB,wEAmBlC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,wEAA0B,CAAC"}
|
|
@@ -17,6 +17,14 @@ export declare function getMiddlewareSpanOptions(target: InjectableTarget | Catc
|
|
|
17
17
|
"sentry.origin": string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Returns span options for nest event spans.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getEventSpanOptions(event: string): {
|
|
24
|
+
name: string;
|
|
25
|
+
attributes: Record<string, string>;
|
|
26
|
+
forceTransaction: boolean;
|
|
27
|
+
};
|
|
20
28
|
/**
|
|
21
29
|
* Adds instrumentation to a js observable and attaches the span to an active parent span.
|
|
22
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/helpers.ts"],"names":[],"mappings":"AACA,OAA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AAC,CAAC;IACnC,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CASA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAaxG;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,GAAG,YAAY,CAcrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nest.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/nest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nest.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/nest.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAgBnE,eAAO,MAAM,cAAc,SACrB,IAAI;;CAMT,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,eAAe,2CAAsC,CAAC;AAEnE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAyDhG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
+
/**
|
|
4
|
+
* Custom instrumentation for nestjs event-emitter
|
|
5
|
+
*
|
|
6
|
+
* This hooks into the `OnEvent` decorator, which is applied on event handlers.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SentryNestEventInstrumentation extends InstrumentationBase {
|
|
9
|
+
static readonly COMPONENT = "@nestjs/event-emitter";
|
|
10
|
+
static readonly COMMON_ATTRIBUTES: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
constructor(config?: InstrumentationConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
16
|
+
*/
|
|
17
|
+
init(): InstrumentationNodeModuleDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* Wraps the @OnEvent decorator.
|
|
20
|
+
*/
|
|
21
|
+
private _getOnEventFileInstrumentation;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a wrapper function for the @OnEvent decorator.
|
|
24
|
+
*/
|
|
25
|
+
private _createWrapOnEvent;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=sentry-nest-event-instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentry-nest-event-instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/sentry-nest-event-instrumentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EAEpC,MAAM,gCAAgC,CAAC;AAQxC;;;;GAIG;AACH,qBAAa,8BAA+B,SAAQ,mBAAmB;IACrE,gBAAuB,SAAS,2BAA2B;IAC3D,gBAAuB,iBAAiB;;MAEtC;gBAEiB,MAAM,GAAE,qBAA0B;IAIrD;;OAEG;IACI,IAAI,IAAI,mCAAmC;IAUlD;;OAEG;IACH,OAAO,CAAC,8BAA8B;IAiBtC;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAqD3B"}
|
|
@@ -61,6 +61,14 @@ export interface CatchTarget {
|
|
|
61
61
|
catch?: (...args: any[]) => any;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Represents a target method in NestJS annotated with @OnEvent.
|
|
66
|
+
*/
|
|
67
|
+
export interface OnEventTarget {
|
|
68
|
+
name: string;
|
|
69
|
+
sentryPatched?: boolean;
|
|
70
|
+
__SENTRY_INTERNAL__?: boolean;
|
|
71
|
+
}
|
|
64
72
|
/**
|
|
65
73
|
* Represents an express NextFunction.
|
|
66
74
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/nest/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,6BAA6B;IAC5C,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;IAEF,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;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,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,YAAY,CAAC;CACvG;AAED;;GAE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b,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE;QACT,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAC7E,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACnF,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;QACpC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;KACtF,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE;QACT,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;KACjC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC"}
|
|
@@ -31,7 +31,7 @@ export { tediousIntegration } from './integrations/tracing/tedious';
|
|
|
31
31
|
export { genericPoolIntegration } from './integrations/tracing/genericPool';
|
|
32
32
|
export { dataloaderIntegration } from './integrations/tracing/dataloader';
|
|
33
33
|
export { amqplibIntegration } from './integrations/tracing/amqplib';
|
|
34
|
-
export { processThreadBreadcrumbIntegration } from './integrations/
|
|
34
|
+
export { processThreadBreadcrumbIntegration, childProcessIntegration } from './integrations/childProcess';
|
|
35
35
|
export { SentryContextManager } from './otel/contextManager';
|
|
36
36
|
export { generateInstrumentOnce } from './otel/instrument';
|
|
37
37
|
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, validateOpenTelemetrySetup, } from './sdk';
|
|
@@ -46,5 +46,5 @@ export { NodeOptions } from './types';
|
|
|
46
46
|
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
|
|
47
47
|
export { addOpenTelemetryInstrumentation, continueTrace, setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
48
48
|
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, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, zodErrorsIntegration, profiler, } from '@sentry/core';
|
|
49
|
-
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
|
|
49
|
+
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
|
|
50
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to include child process arguments in breadcrumbs data.
|
|
4
|
+
*
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
includeChildProcessArgs?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Capture breadcrumbs for child processes and worker threads.
|
|
11
|
+
*/
|
|
12
|
+
export declare const childProcessIntegration: (options?: Options | undefined) => import("@sentry/types").Integration;
|
|
13
|
+
/**
|
|
14
|
+
* Capture breadcrumbs for child processes and worker threads.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Use `childProcessIntegration` integration instead. Functionally they are the same. `processThreadBreadcrumbIntegration` will be removed in the next major version.
|
|
17
|
+
*/
|
|
18
|
+
export declare const processThreadBreadcrumbIntegration: (options?: Options | undefined) => import("@sentry/types").Integration;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=childProcess.d.ts.map
|
|
@@ -17,6 +17,14 @@ export declare function getMiddlewareSpanOptions(target: InjectableTarget | Catc
|
|
|
17
17
|
"sentry.origin": string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Returns span options for nest event spans.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getEventSpanOptions(event: string): {
|
|
24
|
+
name: string;
|
|
25
|
+
attributes: Record<string, string>;
|
|
26
|
+
forceTransaction: boolean;
|
|
27
|
+
};
|
|
20
28
|
/**
|
|
21
29
|
* Adds instrumentation to a js observable and attaches the span to an active parent span.
|
|
22
30
|
*/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
+
/**
|
|
4
|
+
* Custom instrumentation for nestjs event-emitter
|
|
5
|
+
*
|
|
6
|
+
* This hooks into the `OnEvent` decorator, which is applied on event handlers.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SentryNestEventInstrumentation extends InstrumentationBase {
|
|
9
|
+
static readonly COMPONENT = "@nestjs/event-emitter";
|
|
10
|
+
static readonly COMMON_ATTRIBUTES: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
constructor(config?: InstrumentationConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
16
|
+
*/
|
|
17
|
+
init(): InstrumentationNodeModuleDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* Wraps the @OnEvent decorator.
|
|
20
|
+
*/
|
|
21
|
+
private _getOnEventFileInstrumentation;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a wrapper function for the @OnEvent decorator.
|
|
24
|
+
*/
|
|
25
|
+
private _createWrapOnEvent;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=sentry-nest-event-instrumentation.d.ts.map
|
|
@@ -61,6 +61,14 @@ export interface CatchTarget {
|
|
|
61
61
|
catch?: (...args: any[]) => any;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Represents a target method in NestJS annotated with @OnEvent.
|
|
66
|
+
*/
|
|
67
|
+
export interface OnEventTarget {
|
|
68
|
+
name: string;
|
|
69
|
+
sentryPatched?: boolean;
|
|
70
|
+
__SENTRY_INTERNAL__?: boolean;
|
|
71
|
+
}
|
|
64
72
|
/**
|
|
65
73
|
* Represents an express NextFunction.
|
|
66
74
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "8.39.0
|
|
3
|
+
"version": "8.39.0",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -97,10 +97,10 @@
|
|
|
97
97
|
"@opentelemetry/sdk-trace-base": "^1.26.0",
|
|
98
98
|
"@opentelemetry/semantic-conventions": "^1.27.0",
|
|
99
99
|
"@prisma/instrumentation": "5.19.1",
|
|
100
|
-
"@sentry/core": "8.39.0
|
|
101
|
-
"@sentry/opentelemetry": "8.39.0
|
|
102
|
-
"@sentry/types": "8.39.0
|
|
103
|
-
"@sentry/utils": "8.39.0
|
|
100
|
+
"@sentry/core": "8.39.0",
|
|
101
|
+
"@sentry/opentelemetry": "8.39.0",
|
|
102
|
+
"@sentry/types": "8.39.0",
|
|
103
|
+
"@sentry/utils": "8.39.0",
|
|
104
104
|
"import-in-the-middle": "^1.11.2"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processThread.js","sources":["../../../src/integrations/processThread.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process';\nimport * as diagnosticsChannel from 'node:diagnostics_channel';\nimport type { Worker } from 'node:worker_threads';\nimport { addBreadcrumb, defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\ninterface Options {\n /**\n * Whether to include child process arguments in breadcrumbs data.\n *\n * @default false\n */\n includeChildProcessArgs?: boolean;\n}\n\nconst INTEGRATION_NAME = 'ProcessAndThreadBreadcrumbs';\n\nconst _processThreadBreadcrumbIntegration = ((options: Options = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(_client) {\n // eslint-disable-next-line deprecation/deprecation\n diagnosticsChannel.channel('child_process').subscribe((event: unknown) => {\n if (event && typeof event === 'object' && 'process' in event) {\n captureChildProcessEvents(event.process as ChildProcess, options);\n }\n });\n\n // eslint-disable-next-line deprecation/deprecation\n diagnosticsChannel.channel('worker_threads').subscribe((event: unknown) => {\n if (event && typeof event === 'object' && 'worker' in event) {\n captureWorkerThreadEvents(event.worker as Worker);\n }\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Capture breadcrumbs for child processes and worker threads.\n */\nexport const processThreadBreadcrumbIntegration = defineIntegration(_processThreadBreadcrumbIntegration);\n\nfunction captureChildProcessEvents(child: ChildProcess, options: Options): void {\n let hasExited = false;\n let data: Record<string, unknown> | undefined;\n\n child\n .on('spawn', () => {\n // This is Sentry getting macOS OS context\n if (child.spawnfile === '/usr/bin/sw_vers') {\n hasExited = true;\n return;\n }\n\n data = { spawnfile: child.spawnfile };\n if (options.includeChildProcessArgs) {\n data.spawnargs = child.spawnargs;\n }\n })\n .on('exit', code => {\n if (!hasExited) {\n hasExited = true;\n\n // Only log for non-zero exit codes\n if (code !== null && code !== 0) {\n addBreadcrumb({\n category: 'child_process',\n message: `Child process exited with code '${code}'`,\n level: 'warning',\n data,\n });\n }\n }\n })\n .on('error', error => {\n if (!hasExited) {\n hasExited = true;\n\n addBreadcrumb({\n category: 'child_process',\n message: `Child process errored with '${error.message}'`,\n level: 'error',\n data,\n });\n }\n });\n}\n\nfunction captureWorkerThreadEvents(worker: Worker): void {\n let threadId: number | undefined;\n\n worker\n .on('online', () => {\n threadId = worker.threadId;\n })\n .on('error', error => {\n addBreadcrumb({\n category: 'worker_thread',\n message: `Worker thread errored with '${error.message}'`,\n level: 'error',\n data: { threadId },\n });\n });\n}\n"],"names":["defineIntegration","addBreadcrumb"],"mappings":";;;;;A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;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processThread.js","sources":["../../../src/integrations/processThread.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process';\nimport * as diagnosticsChannel from 'node:diagnostics_channel';\nimport type { Worker } from 'node:worker_threads';\nimport { addBreadcrumb, defineIntegration } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/types';\n\ninterface Options {\n /**\n * Whether to include child process arguments in breadcrumbs data.\n *\n * @default false\n */\n includeChildProcessArgs?: boolean;\n}\n\nconst INTEGRATION_NAME = 'ProcessAndThreadBreadcrumbs';\n\nconst _processThreadBreadcrumbIntegration = ((options: Options = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(_client) {\n // eslint-disable-next-line deprecation/deprecation\n diagnosticsChannel.channel('child_process').subscribe((event: unknown) => {\n if (event && typeof event === 'object' && 'process' in event) {\n captureChildProcessEvents(event.process as ChildProcess, options);\n }\n });\n\n // eslint-disable-next-line deprecation/deprecation\n diagnosticsChannel.channel('worker_threads').subscribe((event: unknown) => {\n if (event && typeof event === 'object' && 'worker' in event) {\n captureWorkerThreadEvents(event.worker as Worker);\n }\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Capture breadcrumbs for child processes and worker threads.\n */\nexport const processThreadBreadcrumbIntegration = defineIntegration(_processThreadBreadcrumbIntegration);\n\nfunction captureChildProcessEvents(child: ChildProcess, options: Options): void {\n let hasExited = false;\n let data: Record<string, unknown> | undefined;\n\n child\n .on('spawn', () => {\n // This is Sentry getting macOS OS context\n if (child.spawnfile === '/usr/bin/sw_vers') {\n hasExited = true;\n return;\n }\n\n data = { spawnfile: child.spawnfile };\n if (options.includeChildProcessArgs) {\n data.spawnargs = child.spawnargs;\n }\n })\n .on('exit', code => {\n if (!hasExited) {\n hasExited = true;\n\n // Only log for non-zero exit codes\n if (code !== null && code !== 0) {\n addBreadcrumb({\n category: 'child_process',\n message: `Child process exited with code '${code}'`,\n level: 'warning',\n data,\n });\n }\n }\n })\n .on('error', error => {\n if (!hasExited) {\n hasExited = true;\n\n addBreadcrumb({\n category: 'child_process',\n message: `Child process errored with '${error.message}'`,\n level: 'error',\n data,\n });\n }\n });\n}\n\nfunction captureWorkerThreadEvents(worker: Worker): void {\n let threadId: number | undefined;\n\n worker\n .on('online', () => {\n threadId = worker.threadId;\n })\n .on('error', error => {\n addBreadcrumb({\n category: 'worker_thread',\n message: `Worker thread errored with '${error.message}'`,\n level: 'error',\n data: { threadId },\n });\n });\n}\n"],"names":[],"mappings":";;;AAeA,MAAM,gBAAA,GAAmB,6BAA6B;;AAEtD,MAAM,mCAAA,IAAuC,CAAC,OAAO,GAAY,EAAE,KAAK;AACxE,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,KAAK,CAAC,OAAO,EAAE;AACnB;AACA,MAAM,kBAAkB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,KAAc;AAChF,QAAQ,IAAI,KAAM,IAAG,OAAO,KAAA,KAAU,QAAA,IAAY,SAAA,IAAa,KAAK,EAAE;AACtE,UAAU,yBAAyB,CAAC,KAAK,CAAC,OAAQ,GAAiB,OAAO,CAAC;AAC3E;AACA,OAAO,CAAC;;AAER;AACA,MAAM,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,KAAc;AACjF,QAAQ,IAAI,KAAM,IAAG,OAAO,KAAA,KAAU,QAAA,IAAY,QAAA,IAAY,KAAK,EAAE;AACrE,UAAU,yBAAyB,CAAC,KAAK,CAAC,QAAiB;AAC3D;AACA,OAAO,CAAC;AACR,KAAK;AACL,GAAG;AACH,CAAC,CAAE;;AAEH;AACA;AACA;MACa,kCAAmC,GAAE,iBAAiB,CAAC,mCAAmC;;AAEvG,SAAS,yBAAyB,CAAC,KAAK,EAAgB,OAAO,EAAiB;AAChF,EAAE,IAAI,SAAU,GAAE,KAAK;AACvB,EAAE,IAAI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AM,CAAC,QAAQ;AAChC,KAAK;AACL,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS;AAC1B,MAAM,aAAa,CAAC;AACpB,QAAQ,QAAQ,EAAE,eAAe;AACjC,QAAQ,OAAO,EAAE,CAAC,4BAA4B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAChE,QAAQ,KAAK,EAAE,OAAO;AACtB,QAAQ,IAAI,EAAE,EAAE,QAAA,EAAU;AAC1B,OAAO,CAAC;AACR,KAAK,CAAC;AACN;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
/**
|
|
3
|
-
* Whether to include child process arguments in breadcrumbs data.
|
|
4
|
-
*
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
includeChildProcessArgs?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Capture breadcrumbs for child processes and worker threads.
|
|
11
|
-
*/
|
|
12
|
-
export declare const processThreadBreadcrumbIntegration: (options?: Options | undefined) => import("@sentry/types").Integration;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=processThread.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processThread.d.ts","sourceRoot":"","sources":["../../../src/integrations/processThread.ts"],"names":[],"mappings":"AAMA,UAAU,OAAO;IACf;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAyBD;;GAEG;AACH,eAAO,MAAM,kCAAkC,wEAAyD,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
/**
|
|
3
|
-
* Whether to include child process arguments in breadcrumbs data.
|
|
4
|
-
*
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
includeChildProcessArgs?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Capture breadcrumbs for child processes and worker threads.
|
|
11
|
-
*/
|
|
12
|
-
export declare const processThreadBreadcrumbIntegration: (options?: Options | undefined) => import("@sentry/types").Integration;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=processThread.d.ts.map
|