@sentry/node 10.66.0 → 10.68.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 +21 -19
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/http.js +2 -1
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +13 -3
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/vendored/utils.js +4 -1
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +1 -1
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js +8 -9
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js +5 -118
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +33 -23
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +0 -16
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/cache.js +1 -1
- package/build/cjs/integrations/tracing/redis/cache.js.map +1 -1
- package/build/cjs/sdk/index.js +11 -0
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +26 -2
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/utils/redisCache.js +4 -0
- package/build/cjs/utils/redisCache.js.map +1 -1
- package/build/esm/index.js +2 -2
- package/build/esm/integrations/http.js +3 -2
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +13 -3
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/koa/vendored/utils.js +5 -2
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +2 -2
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/patches.js +3 -4
- package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/utils.js +6 -118
- package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +35 -25
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +1 -16
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/redis/cache.js +2 -2
- package/build/esm/integrations/tracing/redis/cache.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js +11 -1
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +27 -3
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/utils/redisCache.js +4 -1
- package/build/esm/utils/redisCache.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/http.d.ts.map +1 -1
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +6 -15
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +0 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +1 -3
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/types.d.ts +2 -18
- package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
- package/build/types/sdk/index.d.ts +18 -0
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types/utils/redisCache.d.ts +2 -1
- package/build/types/utils/redisCache.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +2 -2
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +6 -15
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +0 -1
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +1 -3
- package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +2 -18
- package/build/types-ts3.8/sdk/index.d.ts +18 -0
- package/build/types-ts3.8/utils/redisCache.d.ts +2 -1
- package/package.json +5 -5
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js +0 -14
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +0 -10
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +0 -6
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js +0 -12
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js +0 -6
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +0 -4
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +0 -1
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +0 -17
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -9
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +0 -17
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initOtel.js","sources":["../../../src/sdk/initOtel.ts"],"sourcesContent":["import { context, propagation, trace } from '@opentelemetry/api';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-base';\nimport { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';\nimport { debug as coreDebug, hasSpanStreamingEnabled } from '@sentry/core';\nimport {\n initializeEsmLoader,\n type NodeClient,\n SentryContextManager,\n setupOpenTelemetryLogger,\n} from '@sentry/node-core';\nimport {\n applyOtelSpanData,\n type AsyncLocalStorageLookup,\n backfillStreamedSpanDataFromOtel,\n getSentryResource,\n type OpenTelemetryTracerProvider,\n SentryPropagator,\n SentrySampler,\n SentrySpanProcessor,\n SentryTracerProvider,\n setIsSetup,\n} from '@sentry/opentelemetry';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { getOpenTelemetryInstrumentationToPreload } from '../integrations/tracing';\n\n// About 277h - this must fit into new Array(len)!\nconst MAX_MAX_SPAN_WAIT_DURATION = 1_000_000;\n\ninterface AdditionalOpenTelemetryOptions {\n /** Additional SpanProcessor instances that should be used. */\n spanProcessors?: SpanProcessor[];\n}\n\n/**\n * Initialize OpenTelemetry for Node.\n */\nexport function initOpenTelemetry(client: NodeClient, options: AdditionalOpenTelemetryOptions = {}): void {\n if (client.getOptions().debug) {\n setupOpenTelemetryLogger();\n }\n\n const [provider, asyncLocalStorageLookup] = setupOtel(client, options);\n client.traceProvider = provider;\n client.asyncLocalStorageLookup = asyncLocalStorageLookup;\n}\n\ninterface NodePreloadOptions {\n debug?: boolean;\n integrations?: string[];\n}\n\n/**\n * Preload OpenTelemetry for Node.\n * This can be used to preload instrumentation early, but set up Sentry later.\n * By preloading the OTEL instrumentation wrapping still happens early enough that everything works.\n */\nexport function preloadOpenTelemetry(options: NodePreloadOptions = {}): void {\n const { debug } = options;\n\n if (debug) {\n coreDebug.enable();\n }\n\n initializeEsmLoader();\n\n // These are all integrations that we need to pre-load to ensure they are set up before any other code runs\n getPreloadMethods(options.integrations).forEach(fn => {\n fn();\n\n if (debug) {\n coreDebug.log(`[Sentry] Preloaded ${fn.id} instrumentation`);\n }\n });\n}\n\nfunction getPreloadMethods(integrationNames?: string[]): ((() => void) & { id: string })[] {\n const instruments = getOpenTelemetryInstrumentationToPreload();\n\n if (!integrationNames) {\n return instruments;\n }\n\n // We match exact matches of instrumentation, but also match prefixes, e.g. \"Fastify.v5\" will match \"Fastify\"\n return instruments.filter(instrumentation => {\n const id = instrumentation.id;\n return integrationNames.some(integrationName => id === integrationName || id.startsWith(`${integrationName}.`));\n });\n}\n\n/** Just exported for tests. */\nexport function setupOtel(\n client: NodeClient,\n options: AdditionalOpenTelemetryOptions = {},\n): [OpenTelemetryTracerProvider | undefined, AsyncLocalStorageLookup | undefined] {\n // Sentry's minimal tracer provider is the default. We fall back to the full OpenTelemetry SDK\n // `BasicTracerProvider` when the user explicitly opts in via `openTelemetryBasicTracerProvider`, or\n // when they provide custom `openTelemetrySpanProcessors` — those require the SDK span pipeline\n // that the minimal provider does not run.\n const shouldUseBasicTracerProvider =\n client.getOptions().openTelemetryBasicTracerProvider || !!options.spanProcessors?.length;\n\n if (!shouldUseBasicTracerProvider) {\n return setupSentryTracerProvider(client);\n }\n\n // Create and configure NodeTracerProvider\n const provider = new BasicTracerProvider({\n sampler: new SentrySampler(client),\n resource: getSentryResource('node'),\n forceFlushTimeoutMillis: 500,\n spanProcessors: [\n new SentrySpanProcessor({\n timeout: _clampSpanProcessorTimeout(client.getOptions().maxSpanWaitDuration),\n client,\n }),\n ...(options.spanProcessors || []),\n ],\n });\n\n // Register as globals\n trace.setGlobalTracerProvider(provider);\n propagation.setGlobalPropagator(new SentryPropagator());\n\n const ctxManager = new SentryContextManager();\n context.setGlobalContextManager(ctxManager);\n\n return [provider, ctxManager.getAsyncLocalStorageLookup()];\n}\n\nfunction setupSentryTracerProvider(\n client: NodeClient,\n): [SentryTracerProvider | undefined, AsyncLocalStorageLookup | undefined] {\n const provider = new SentryTracerProvider({ resource: getSentryResource('node') });\n\n if (!trace.setGlobalTracerProvider(provider)) {\n DEBUG_BUILD &&\n coreDebug.warn(\n 'Could not register SentryTracerProvider because another OpenTelemetry tracer provider is already registered.',\n );\n return [undefined, undefined];\n }\n\n // Only mark the provider as set up once it is actually the registered global\n // tracer provider, so setup validation doesn't skip required checks when\n // registration failed.\n setIsSetup('SentryTracerProvider');\n\n propagation.setGlobalPropagator(new SentryPropagator());\n\n const ctxManager = new SentryContextManager();\n context.setGlobalContextManager(ctxManager);\n\n client.on('spanEnd', span => {\n applyOtelSpanData(span, { finalizeStatus: true });\n });\n\n if (hasSpanStreamingEnabled(client)) {\n // Streamed spans skip the exporter, so per-span data inferred from OTel semantic conventions\n // (notably `sentry.source` on child spans, which `applyOtelSpanData` only sets on segment roots)\n // is backfilled here, reusing the exact inference the OTel SDK `SentrySpanProcessor` applies.\n client.on('preprocessSpan', backfillStreamedSpanDataFromOtel);\n }\n\n client.on('preprocessEvent', event => {\n if (event.type !== 'transaction') {\n return;\n }\n\n event.contexts = {\n ...event.contexts,\n otel: {\n resource: provider.resource?.attributes,\n ...event.contexts?.otel,\n },\n };\n });\n\n return [provider, ctxManager.getAsyncLocalStorageLookup()];\n}\n\n/** Just exported for tests. */\nexport function _clampSpanProcessorTimeout(maxSpanWaitDuration: number | undefined): number | undefined {\n if (maxSpanWaitDuration == null) {\n return undefined;\n }\n\n // We guard for a max. value here, because we create an array with this length\n // So if this value is too large, this would fail\n if (maxSpanWaitDuration > MAX_MAX_SPAN_WAIT_DURATION) {\n DEBUG_BUILD &&\n coreDebug.warn(`\\`maxSpanWaitDuration\\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`);\n return MAX_MAX_SPAN_WAIT_DURATION;\n } else if (maxSpanWaitDuration <= 0 || Number.isNaN(maxSpanWaitDuration)) {\n DEBUG_BUILD && coreDebug.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.');\n return undefined;\n }\n\n return maxSpanWaitDuration;\n}\n"],"names":["debug","coreDebug"],"mappings":";;;;;;;;AA0BA,MAAM,0BAAA,GAA6B,GAAA;AAU5B,SAAS,iBAAA,CAAkB,MAAA,EAAoB,OAAA,GAA0C,EAAC,EAAS;AACxG,EAAA,IAAI,MAAA,CAAO,UAAA,EAAW,CAAE,KAAA,EAAO;AAC7B,IAAA,wBAAA,EAAyB;AAAA,EAC3B;AAEA,EAAA,MAAM,CAAC,QAAA,EAAU,uBAAuB,CAAA,GAAI,SAAA,CAAU,QAAQ,OAAO,CAAA;AACrE,EAAA,MAAA,CAAO,aAAA,GAAgB,QAAA;AACvB,EAAA,MAAA,CAAO,uBAAA,GAA0B,uBAAA;AACnC;AAYO,SAAS,oBAAA,CAAqB,OAAA,GAA8B,EAAC,EAAS;AAC3E,EAAA,MAAM,SAAEA,SAAM,GAAI,OAAA;AAElB,EAAA,IAAIA,OAAA,EAAO;AACT,IAAAC,KAAA,CAAU,MAAA,EAAO;AAAA,EACnB;AAEA,EAAA,mBAAA,EAAoB;AAGpB,EAAA,iBAAA,CAAkB,OAAA,CAAQ,YAAY,CAAA,CAAE,OAAA,CAAQ,CAAA,EAAA,KAAM;AACpD,IAAA,EAAA,EAAG;AAEH,IAAA,IAAID,OAAA,EAAO;AACT,MAAAC,KAAA,CAAU,GAAA,CAAI,CAAA,mBAAA,EAAsB,EAAA,CAAG,EAAE,CAAA,gBAAA,CAAkB,CAAA;AAAA,IAC7D;AAAA,EACF,CAAC,CAAA;AACH;AAEA,SAAS,kBAAkB,gBAAA,EAAgE;AACzF,EAAA,MAAM,cAAc,wCAAA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AAC,CAAA;AAED,EAAA,OAAO,CAAC,QAAA,EAAU,UAAA,CAAW,0BAAA,EAA4B,CAAA;AAC3D;AAGO,SAAS,2BAA2B,mBAAA,EAA6D;AACtG,EAAA,IAAI,uBAAuB,IAAA,EAAM;AAC/B,IAAA,OAAO,MAAA;AAAA,EACT;AAIA,EAAA,IAAI,sBAAsB,0BAAA,EAA4B;AACpD,IAAA,WAAA,IACEA,KAAA,CAAU,IAAA,CAAK,CAAA,gEAAA,EAAmE,0BAA0B,CAAA,CAAE,CAAA;AAChH,IAAA,OAAO,0BAAA;AAAA,EACT,WAAW,mBAAA,IAAuB,CAAA,IAAK,MAAA,CAAO,KAAA,CAAM,mBAAmB,CAAA,EAAG;AACxE,IAAA,WAAA,IAAeA,KAAA,CAAU,KAAK,+EAA+E,CAAA;AAC7G,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,OAAO,mBAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"initOtel.js","sources":["../../../src/sdk/initOtel.ts"],"sourcesContent":["import type { TracerProvider } from '@opentelemetry/api';\nimport { context, propagation, trace } from '@opentelemetry/api';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-base';\nimport { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';\nimport { debug as coreDebug, hasSpanStreamingEnabled } from '@sentry/core';\nimport {\n initializeEsmLoader,\n type NodeClient,\n SentryContextManager,\n setupOpenTelemetryLogger,\n} from '@sentry/node-core';\nimport {\n applyOtelSpanData,\n type AsyncLocalStorageLookup,\n backfillStreamedSpanDataFromOtel,\n getSentryResource,\n type OpenTelemetryTracerProvider,\n SentryPropagator,\n SentrySampler,\n SentrySpanProcessor,\n SentryTracerProvider,\n setIsSetup,\n} from '@sentry/opentelemetry';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { getOpenTelemetryInstrumentationToPreload } from '../integrations/tracing';\n\n// About 277h - this must fit into new Array(len)!\nconst MAX_MAX_SPAN_WAIT_DURATION = 1_000_000;\n\n// The global registry of @opentelemetry/api 1.x, shared across all copies of the package\nconst OTEL_API_GLOBAL_KEY = Symbol.for('opentelemetry.js.api.1');\n\n/**\n * Registers the given tracer provider as the global tracer provider, recreating the OpenTelemetry\n * API registry when it pre-exists with a different `@opentelemetry/api` version.\n *\n * Some host runtimes (e.g. Neon Functions) pre-create the registry with their own API version.\n * `registerGlobal` requires an exact version match, so every registration through the SDK's copy\n * of `@opentelemetry/api` is rejected and tracing is silently disabled\n * (https://github.com/getsentry/sentry-javascript/issues/22338). This case is identified by a\n * failed registration with an empty `trace` slot: `registerGlobal` checks the slot before the\n * version, so an empty slot means the version gate rejected us and recreating the registry\n * clobbers no other tracer provider. If the slot is occupied (another provider registered first,\n * e.g. a second `Sentry.init()` call), the registry is left untouched and registration fails.\n *\n * Slots Sentry does not claim itself (e.g. `diag`, `metrics`) are carried over into the recreated\n * registry: reads resolve via a semver-compatibility check rather than the exact-match write gate,\n * so they keep working for the copy that registered them. `propagation` and `context` are not\n * carried over because Sentry registers its own right after this.\n */\nfunction registerGlobalTracerProvider(provider: TracerProvider): boolean {\n if (trace.setGlobalTracerProvider(provider)) {\n return true;\n }\n\n // @opentelemetry/api stores the registry under a `Symbol.for` key that no public type\n // describes, so `typeof globalThis` can only be narrowed to it by casting through `unknown`.\n const otelGlobal = globalThis as unknown as Record<symbol, Record<string, unknown> | undefined>;\n const registry = otelGlobal[OTEL_API_GLOBAL_KEY];\n if (registry && !registry.trace) {\n DEBUG_BUILD &&\n coreDebug.warn(\n 'Replaced a pre-existing OpenTelemetry API registry that was created by a different @opentelemetry/api version and would have blocked tracing. If you want to manage OpenTelemetry yourself, set `skipOpenTelemetrySetup: true` in `Sentry.init()`.',\n );\n otelGlobal[OTEL_API_GLOBAL_KEY] = undefined;\n\n if (!trace.setGlobalTracerProvider(provider)) {\n return false;\n }\n\n // The cast is needed because TS still has the slot narrowed to `undefined` from the reset\n // above and cannot know the registration call just recreated the registry.\n const recreatedRegistry = otelGlobal[OTEL_API_GLOBAL_KEY] as Record<string, unknown> | undefined;\n if (recreatedRegistry) {\n const { propagation: _propagation, context: _context, ...carriedOverSlots } = registry;\n otelGlobal[OTEL_API_GLOBAL_KEY] = { ...carriedOverSlots, ...recreatedRegistry };\n }\n\n return true;\n }\n\n return false;\n}\n\ninterface AdditionalOpenTelemetryOptions {\n /** Additional SpanProcessor instances that should be used. */\n spanProcessors?: SpanProcessor[];\n}\n\n/**\n * Initialize OpenTelemetry for Node.\n */\nexport function initOpenTelemetry(client: NodeClient, options: AdditionalOpenTelemetryOptions = {}): void {\n if (client.getOptions().debug) {\n setupOpenTelemetryLogger();\n }\n\n const [provider, asyncLocalStorageLookup] = setupOtel(client, options);\n client.traceProvider = provider;\n client.asyncLocalStorageLookup = asyncLocalStorageLookup;\n}\n\ninterface NodePreloadOptions {\n debug?: boolean;\n integrations?: string[];\n}\n\n/**\n * Preload OpenTelemetry for Node.\n * This can be used to preload instrumentation early, but set up Sentry later.\n * By preloading the OTEL instrumentation wrapping still happens early enough that everything works.\n */\nexport function preloadOpenTelemetry(options: NodePreloadOptions = {}): void {\n const { debug } = options;\n\n if (debug) {\n coreDebug.enable();\n }\n\n initializeEsmLoader();\n\n // These are all integrations that we need to pre-load to ensure they are set up before any other code runs\n getPreloadMethods(options.integrations).forEach(fn => {\n fn();\n\n if (debug) {\n coreDebug.log(`[Sentry] Preloaded ${fn.id} instrumentation`);\n }\n });\n}\n\nfunction getPreloadMethods(integrationNames?: string[]): ((() => void) & { id: string })[] {\n const instruments = getOpenTelemetryInstrumentationToPreload();\n\n if (!integrationNames) {\n return instruments;\n }\n\n // We match exact matches of instrumentation, but also match prefixes, e.g. \"Fastify.v5\" will match \"Fastify\"\n return instruments.filter(instrumentation => {\n const id = instrumentation.id;\n return integrationNames.some(integrationName => id === integrationName || id.startsWith(`${integrationName}.`));\n });\n}\n\n/** Just exported for tests. */\nexport function setupOtel(\n client: NodeClient,\n options: AdditionalOpenTelemetryOptions = {},\n): [OpenTelemetryTracerProvider | undefined, AsyncLocalStorageLookup | undefined] {\n // Sentry's minimal tracer provider is the default. We fall back to the full OpenTelemetry SDK\n // `BasicTracerProvider` when the user explicitly opts in via `openTelemetryBasicTracerProvider`, or\n // when they provide custom `openTelemetrySpanProcessors` — those require the SDK span pipeline\n // that the minimal provider does not run.\n const shouldUseBasicTracerProvider =\n client.getOptions().openTelemetryBasicTracerProvider || !!options.spanProcessors?.length;\n\n if (!shouldUseBasicTracerProvider) {\n return setupSentryTracerProvider(client);\n }\n\n // Create and configure NodeTracerProvider\n const provider = new BasicTracerProvider({\n sampler: new SentrySampler(client),\n resource: getSentryResource('node'),\n forceFlushTimeoutMillis: 500,\n spanProcessors: [\n new SentrySpanProcessor({\n timeout: _clampSpanProcessorTimeout(client.getOptions().maxSpanWaitDuration),\n client,\n }),\n ...(options.spanProcessors || []),\n ],\n });\n\n // Register as globals\n registerGlobalTracerProvider(provider);\n propagation.setGlobalPropagator(new SentryPropagator());\n\n const ctxManager = new SentryContextManager();\n context.setGlobalContextManager(ctxManager);\n\n return [provider, ctxManager.getAsyncLocalStorageLookup()];\n}\n\nfunction setupSentryTracerProvider(\n client: NodeClient,\n): [SentryTracerProvider | undefined, AsyncLocalStorageLookup | undefined] {\n const provider = new SentryTracerProvider({ resource: getSentryResource('node') });\n\n if (!registerGlobalTracerProvider(provider)) {\n DEBUG_BUILD &&\n coreDebug.warn(\n 'Could not register SentryTracerProvider because another OpenTelemetry tracer provider is already registered.',\n );\n return [undefined, undefined];\n }\n\n // Only mark the provider as set up once it is actually the registered global\n // tracer provider, so setup validation doesn't skip required checks when\n // registration failed.\n setIsSetup('SentryTracerProvider');\n\n propagation.setGlobalPropagator(new SentryPropagator());\n\n const ctxManager = new SentryContextManager();\n context.setGlobalContextManager(ctxManager);\n\n client.on('spanEnd', span => {\n applyOtelSpanData(span, { finalizeStatus: true });\n });\n\n if (hasSpanStreamingEnabled(client)) {\n // Streamed spans skip the exporter, so per-span data inferred from OTel semantic conventions\n // (notably `sentry.source` on child spans, which `applyOtelSpanData` only sets on segment roots)\n // is backfilled here, reusing the exact inference the OTel SDK `SentrySpanProcessor` applies.\n client.on('preprocessSpan', backfillStreamedSpanDataFromOtel);\n }\n\n client.on('preprocessEvent', event => {\n if (event.type !== 'transaction') {\n return;\n }\n\n event.contexts = {\n ...event.contexts,\n otel: {\n resource: provider.resource?.attributes,\n ...event.contexts?.otel,\n },\n };\n });\n\n return [provider, ctxManager.getAsyncLocalStorageLookup()];\n}\n\n/** Just exported for tests. */\nexport function _clampSpanProcessorTimeout(maxSpanWaitDuration: number | undefined): number | undefined {\n if (maxSpanWaitDuration == null) {\n return undefined;\n }\n\n // We guard for a max. value here, because we create an array with this length\n // So if this value is too large, this would fail\n if (maxSpanWaitDuration > MAX_MAX_SPAN_WAIT_DURATION) {\n DEBUG_BUILD &&\n coreDebug.warn(`\\`maxSpanWaitDuration\\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`);\n return MAX_MAX_SPAN_WAIT_DURATION;\n } else if (maxSpanWaitDuration <= 0 || Number.isNaN(maxSpanWaitDuration)) {\n DEBUG_BUILD && coreDebug.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.');\n return undefined;\n }\n\n return maxSpanWaitDuration;\n}\n"],"names":["coreDebug","debug"],"mappings":";;;;;;;;AA2BA,MAAM,0BAAA,GAA6B,GAAA;AAGnC,MAAM,mBAAA,mBAAsB,MAAA,CAAO,GAAA,CAAI,wBAAwB,CAAA;AAoB/D,SAAS,6BAA6B,QAAA,EAAmC;AACvE,EAAA,IAAI,KAAA,CAAM,uBAAA,CAAwB,QAAQ,CAAA,EAAG;AAC3C,IAAA,OAAO,IAAA;AAAA,EACT;AAIA,EAAA,MAAM,UAAA,GAAa,UAAA;AACnB,EAAA,MAAM,QAAA,GAAW,WAAW,mBAAmB,CAAA;AAC/C,EAAA,IAAI,QAAA,IAAY,CAAC,QAAA,CAAS,KAAA,EAAO;AAC/B,IAAA,WAAA,IACEA,KAAA,CAAU,IAA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,GAAW;AAAA,MACf,GAAG,KAAA,CAAM,QAAA;AAAA,MACT,IAAA,EAAM;AAAA,QACJ,QAAA,EAAU,SAAS,QAAA,EAAU,UAAA;AAAA,QAC7B,GAAG,MAAM,QAAA,EAAU;AAAA;AACrB,KACF;AAAA,EACF,CAAC,CAAA;AAED,EAAA,OAAO,CAAC,QAAA,EAAU,UAAA,CAAW,0BAAA,EAA4B,CAAA;AAC3D;AAGO,SAAS,2BAA2B,mBAAA,EAA6D;AACtG,EAAA,IAAI,uBAAuB,IAAA,EAAM;AAC/B,IAAA,OAAO,MAAA;AAAA,EACT;AAIA,EAAA,IAAI,sBAAsB,0BAAA,EAA4B;AACpD,IAAA,WAAA,IACEA,KAAA,CAAU,IAAA,CAAK,CAAA,gEAAA,EAAmE,0BAA0B,CAAA,CAAE,CAAA;AAChH,IAAA,OAAO,0BAAA;AAAA,EACT,WAAW,mBAAA,IAAuB,CAAA,IAAK,MAAA,CAAO,KAAA,CAAM,mBAAmB,CAAA,EAAG;AACxE,IAAA,WAAA,IAAeA,KAAA,CAAU,KAAK,+EAA+E,CAAA;AAC7G,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,OAAO,mBAAA;AACT;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const SINGLE_ARG_COMMANDS = ["get", "set", "setex"];
|
|
2
2
|
const GET_COMMANDS = ["get", "mget"];
|
|
3
3
|
const SET_COMMANDS = ["set", "setex"];
|
|
4
|
+
const REMOVE_COMMANDS = ["del", "unlink"];
|
|
4
5
|
function isInCommands(redisCommands, command) {
|
|
5
6
|
return redisCommands.includes(command.toLowerCase());
|
|
6
7
|
}
|
|
@@ -9,6 +10,8 @@ function getCacheOperation(command) {
|
|
|
9
10
|
return "cache.get";
|
|
10
11
|
} else if (isInCommands(SET_COMMANDS, command)) {
|
|
11
12
|
return "cache.put";
|
|
13
|
+
} else if (isInCommands(REMOVE_COMMANDS, command)) {
|
|
14
|
+
return "cache.remove";
|
|
12
15
|
} else {
|
|
13
16
|
return void 0;
|
|
14
17
|
}
|
|
@@ -82,5 +85,5 @@ function flatten(input) {
|
|
|
82
85
|
return result;
|
|
83
86
|
}
|
|
84
87
|
|
|
85
|
-
export { GET_COMMANDS, SET_COMMANDS, calculateCacheItemSize, getCacheKeySafely, getCacheOperation, isInCommands, shouldConsiderForCache };
|
|
88
|
+
export { GET_COMMANDS, REMOVE_COMMANDS, SET_COMMANDS, calculateCacheItemSize, getCacheKeySafely, getCacheOperation, isInCommands, shouldConsiderForCache };
|
|
86
89
|
//# sourceMappingURL=redisCache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redisCache.js","sources":["../../../src/utils/redisCache.ts"],"sourcesContent":["export type IORedisCommandArgs = Array<string | Buffer | number | unknown[]>;\n\nconst SINGLE_ARG_COMMANDS = ['get', 'set', 'setex'];\n\nexport const GET_COMMANDS = ['get', 'mget'];\nexport const SET_COMMANDS = ['set', 'setex'];\n// todo:
|
|
1
|
+
{"version":3,"file":"redisCache.js","sources":["../../../src/utils/redisCache.ts"],"sourcesContent":["export type IORedisCommandArgs = Array<string | Buffer | number | unknown[]>;\n\nconst SINGLE_ARG_COMMANDS = ['get', 'set', 'setex'];\n\nexport const GET_COMMANDS = ['get', 'mget'];\nexport const SET_COMMANDS = ['set', 'setex'];\nexport const REMOVE_COMMANDS = ['del', 'unlink'];\n// todo: expire (no matching cache convention op yet)\n\n/** Checks if a given command is in the list of redis commands.\n * Useful because commands can come in lowercase or uppercase (depending on the library). */\nexport function isInCommands(redisCommands: string[], command: string): boolean {\n return redisCommands.includes(command.toLowerCase());\n}\n\n/** Determine cache operation based on redis statement */\nexport function getCacheOperation(command: string): 'cache.get' | 'cache.put' | 'cache.remove' | undefined {\n if (isInCommands(GET_COMMANDS, command)) {\n return 'cache.get';\n } else if (isInCommands(SET_COMMANDS, command)) {\n return 'cache.put';\n } else if (isInCommands(REMOVE_COMMANDS, command)) {\n return 'cache.remove';\n } else {\n return undefined;\n }\n}\n\nfunction keyHasPrefix(key: string, prefixes: string[]): boolean {\n return prefixes.some(prefix => key.startsWith(prefix));\n}\n\n/** Safely converts a redis key to a string (comma-separated if there are multiple keys) */\nexport function getCacheKeySafely(redisCommand: string, cmdArgs: IORedisCommandArgs): string[] | undefined {\n try {\n if (cmdArgs.length === 0) {\n return undefined;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const processArg = (arg: string | Buffer | number | any[]): string[] => {\n if (typeof arg === 'string' || typeof arg === 'number' || Buffer.isBuffer(arg)) {\n return [arg.toString()];\n } else if (Array.isArray(arg)) {\n return flatten(arg.map(arg => processArg(arg)));\n } else {\n return ['<unknown>'];\n }\n };\n\n const firstArg = cmdArgs[0];\n if (isInCommands(SINGLE_ARG_COMMANDS, redisCommand) && firstArg != null) {\n return processArg(firstArg);\n }\n\n return flatten(cmdArgs.map(arg => processArg(arg)));\n } catch {\n return undefined;\n }\n}\n\n/** Determines whether a redis operation should be considered as \"cache operation\" by checking if a key is prefixed.\n * We only support certain commands (such as 'set', 'get', 'mget'). */\nexport function shouldConsiderForCache(redisCommand: string, keys: string[], prefixes: string[]): boolean {\n if (!getCacheOperation(redisCommand)) {\n return false;\n }\n\n for (const key of keys) {\n if (keyHasPrefix(key, prefixes)) {\n return true;\n }\n }\n return false;\n}\n\n/** Calculates size based on the cache response value */\nexport function calculateCacheItemSize(response: unknown): number | undefined {\n const getSize = (value: unknown): number | undefined => {\n try {\n if (Buffer.isBuffer(value)) return value.byteLength;\n else if (typeof value === 'string') return value.length;\n else if (typeof value === 'number') return value.toString().length;\n else if (value === null || value === undefined) return 0;\n return JSON.stringify(value).length;\n } catch {\n return undefined;\n }\n };\n\n return Array.isArray(response)\n ? response.reduce((acc: number | undefined, curr) => {\n const size = getSize(curr);\n return typeof size === 'number' ? (acc !== undefined ? acc + size : size) : acc;\n }, 0)\n : getSize(response);\n}\n\ntype NestedArray<T> = Array<NestedArray<T> | T>;\n\nfunction flatten<T>(input: NestedArray<T>): T[] {\n const result: T[] = [];\n\n const flattenHelper = (input: NestedArray<T>): void => {\n input.forEach((el: T | NestedArray<T>) => {\n if (Array.isArray(el)) {\n flattenHelper(el);\n } else {\n result.push(el);\n }\n });\n };\n\n flattenHelper(input);\n return result;\n}\n"],"names":["arg","input"],"mappings":"AAEA,MAAM,mBAAA,GAAsB,CAAC,KAAA,EAAO,KAAA,EAAO,OAAO,CAAA;AAE3C,MAAM,YAAA,GAAe,CAAC,KAAA,EAAO,MAAM;AACnC,MAAM,YAAA,GAAe,CAAC,KAAA,EAAO,OAAO;AACpC,MAAM,eAAA,GAAkB,CAAC,KAAA,EAAO,QAAQ;AAKxC,SAAS,YAAA,CAAa,eAAyB,OAAA,EAA0B;AAC9E,EAAA,OAAO,aAAA,CAAc,QAAA,CAAS,OAAA,CAAQ,WAAA,EAAa,CAAA;AACrD;AAGO,SAAS,kBAAkB,OAAA,EAAyE;AACzG,EAAA,IAAI,YAAA,CAAa,YAAA,EAAc,OAAO,CAAA,EAAG;AACvC,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,MAAA,IAAW,YAAA,CAAa,YAAA,EAAc,OAAO,CAAA,EAAG;AAC9C,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,MAAA,IAAW,YAAA,CAAa,eAAA,EAAiB,OAAO,CAAA,EAAG;AACjD,IAAA,OAAO,cAAA;AAAA,EACT,CAAA,MAAO;AACL,IAAA,OAAO,MAAA;AAAA,EACT;AACF;AAEA,SAAS,YAAA,CAAa,KAAa,QAAA,EAA6B;AAC9D,EAAA,OAAO,SAAS,IAAA,CAAK,CAAA,MAAA,KAAU,GAAA,CAAI,UAAA,CAAW,MAAM,CAAC,CAAA;AACvD;AAGO,SAAS,iBAAA,CAAkB,cAAsB,OAAA,EAAmD;AACzG,EAAA,IAAI;AACF,IAAA,IAAI,OAAA,CAAQ,WAAW,CAAA,EAAG;AACxB,MAAA,OAAO,KAAA,CAAA;AAAA,IACT;AAGA,IAAA,MAAM,UAAA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EAAA,OAAO,MAAA;AACT;;;;"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ export { langChainIntegration } from './integrations/tracing/langchain';
|
|
|
31
31
|
export { langGraphIntegration } from './integrations/tracing/langgraph';
|
|
32
32
|
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, growthbookIntegration, } from './integrations/featureFlagShims';
|
|
33
33
|
export { firebaseIntegration } from './integrations/tracing/firebase';
|
|
34
|
-
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
|
|
34
|
+
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, applyDiagnosticsChannelInjectionIntegrations, } from './sdk';
|
|
35
35
|
export { experimentalUseDiagnosticsChannelInjection, diagnosticsChannelInjectionIntegrations, } from './sdk/experimentalUseDiagnosticsChannelInjection';
|
|
36
36
|
export { isDiagnosticsChannelInjectionEnabled } from './sdk/diagnosticsChannelInjection';
|
|
37
37
|
export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
38
38
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
39
39
|
export type { NodeOptions } from './types';
|
|
40
40
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
41
|
-
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, wrapMcpServerWithSentry, featureFlagsIntegration, spanStreamingIntegration, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
|
|
41
|
+
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, wrapMcpServerWithSentry, featureFlagsIntegration, spanStreamingIntegration, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentStateGraph, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
|
|
42
42
|
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, Metric, Log, LogSeverityLevel, FeatureFlagsIntegration, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
|
|
43
43
|
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, nodeRuntimeMetricsIntegration, type NodeRuntimeMetricsOptions, consoleIntegration, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, withStreamedSpan, _INTERNAL_normalizeCollectionInterval, } from '@sentry/node-core';
|
|
44
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA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,EACvB,yBAAyB,EACzB,6BAA6B,EAC7B,KAAK,yBAAyB,EAC9B,kBAAkB,EAClB,eAAe,EACf,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,0BAA0B,EAC1B,gBAAgB,EAChB,qCAAqC,GACtC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/integrations/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/integrations/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAQrG,OAAO,EAAqD,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAOtH,UAAU,WAAW;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAE1C;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;OASG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,K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1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/dataloader/vendored/instrumentation.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAa,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/dataloader/vendored/instrumentation.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAa,MAAM,gCAAgC,CAAC;AA8DrH,qBAAa,yBAA0B,SAAQ,mBAAmB;gBACpD,MAAM,KAAK;IAIvB,SAAS,CAAC,IAAI;IA2Bd,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,sBAAsB;IA4B9B,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,mBAAmB;CAgB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/koa/vendored/utils.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,eAAO,MAAM,qBAAqB,GAChC,SAAS,UAAU,EACnB,OAAO,aAAa,EACpB,UAAU,OAAO,EACjB,YAAY,MAAM,GAAG,MAAM,KAC1B;IACD,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/koa/vendored/utils.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,eAAO,MAAM,qBAAqB,GAChC,SAAS,UAAU,EACnB,OAAO,aAAa,EACpB,UAAU,OAAO,EACjB,YAAY,MAAM,GAAG,MAAM,KAC1B;IACD,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CAqBd,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,YAAY,EAAE,SAAS,wBAAwB,KAAG,OAEtF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongo/vendored/patches.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongo/vendored/patches.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAU1B,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,IACvE,UAAU,oBAAoB,CAA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C,UAAU,CAAC,MACZ,MAAM,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,KAAK,IAAI,SASjG"}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import type { Span, SpanAttributes } from '@sentry/core';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
export declare function
|
|
8
|
-
/**
|
|
9
|
-
* Determine a span's attributes by fetching related metadata from the v4 connection context.
|
|
10
|
-
*/
|
|
11
|
-
export declare function getV4SpanAttributes(connectionCtx: any, ns: MongodbNamespace, command?: any, operation?: string): SpanAttributes;
|
|
12
|
-
/**
|
|
13
|
-
* Determine a span's attributes by fetching related metadata from the v3 topology.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getV3SpanAttributes(ns: string, topology: MongoInternalTopology, command?: MongoInternalCommand, operation?: string | undefined): SpanAttributes;
|
|
16
|
-
export declare function startMongoSpan(attributes: SpanAttributes): Span;
|
|
2
|
+
import { getV3CommandOperation, startMongoSpan } from '@sentry/server-utils';
|
|
3
|
+
export { getV3CommandOperation, startMongoSpan };
|
|
4
|
+
/** Determine a span's attributes from the v4 connection context (OTel origin). */
|
|
5
|
+
export declare function getV4SpanAttributes(connectionCtx: any, ns: any, command?: any, operation?: string): SpanAttributes;
|
|
6
|
+
/** Determine a span's attributes from the v3 topology (OTel origin). */
|
|
7
|
+
export declare function getV3SpanAttributes(ns: string, topology: any, command?: any, operation?: string): SpanAttributes;
|
|
17
8
|
/**
|
|
18
9
|
* Wraps the result handler so it ends the span (with error status on failure) and runs the
|
|
19
10
|
* original callback re-activated under the parent span — mongodb loses the async context when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongo/vendored/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongo/vendored/utils.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EACL,qBAAqB,EAGrB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC;AAEjD,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAElH;AAED,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAEhH;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,aAAa,EAAE,QAAQ,GAAG,QAAQ,CAkBlF;AAID,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD"}
|
|
@@ -13,7 +13,6 @@ export declare class MongooseInstrumentation extends InstrumentationBase<Instrum
|
|
|
13
13
|
private patchModelStatic;
|
|
14
14
|
private patchModelAggregate;
|
|
15
15
|
private patchAndCaptureSpanContext;
|
|
16
|
-
private _startSpan;
|
|
17
16
|
private _handleResponse;
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=mongoose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/mongoose.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,KAAK,+BAA+B,EAErC,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/mongoose.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,KAAK,+BAA+B,EAErC,MAAM,gCAAgC,CAAC;AAuExC,eAAO,MAAM,mBAAmB,EAAE,OAAO,MAAqC,CAAC;AAI/E,eAAO,MAAM,qBAAqB,EAAE,OAAO,MAAuC,CAAC;AAEnF,qBAAa,uBAAwB,SAAQ,mBAAmB,CAAC,qBAAqB,CAAC;gBACzE,MAAM,GAAE,qBAA0B;IAI9C,SAAS,CAAC,IAAI,IAAI,+BAA+B;IAajD,OAAO,CAAC,KAAK;IAqCb,OAAO,CAAC,OAAO;IA+Bf,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,cAAc;IAuBtB,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,2BAA2B;IA+BnC,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,0BAA0B;IASlC,OAAO,CAAC,eAAe;CAaxB"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { Span
|
|
2
|
-
import type { Collection } from './mongoose-types';
|
|
3
|
-
export declare function getAttributesFromCollection(collection: Collection): SpanAttributes;
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
4
2
|
export declare function handlePromiseResponse(execResponse: any, span: Span): any;
|
|
5
3
|
export declare function handleCallbackResponse(callback: Function, exec: Function, originalThis: any, span: Span, args: IArguments): any;
|
|
6
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/utils.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAWzC,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,GAAG,CAYxE;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,GAAG,EACjB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,UAAU,OAmBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/redis/cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/redis/cache.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kBAAkB,CAAC;AAM/E,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,eAAO,IAAI,aAAa,EAAE,YAAiB,CAAC;AAE5C,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAE3D;AAGD,eAAO,MAAM,iBAAiB,EAAE,sCAqD/B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Integration } from '@sentry/core';
|
|
2
|
+
import type { VercelAiOptions as VercelAiBaseOptions } from '@sentry/server-utils';
|
|
2
3
|
/**
|
|
3
4
|
* Telemetry configuration.
|
|
4
5
|
*/
|
|
@@ -36,29 +37,12 @@ export type TelemetrySettings = {
|
|
|
36
37
|
* null or undefined attribute values are invalid and will result in undefined behavior.
|
|
37
38
|
*/
|
|
38
39
|
export declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
39
|
-
export interface VercelAiOptions {
|
|
40
|
-
/**
|
|
41
|
-
* Enable or disable input recording. Enabled if `dataCollection.genAI.inputs` (or the deprecated `sendDefaultPii` option) is `true`
|
|
42
|
-
* or if you set `isEnabled` to `true` in your ai SDK method telemetry settings.
|
|
43
|
-
* Integration-level options take precedence over global `dataCollection` config.
|
|
44
|
-
*/
|
|
45
|
-
recordInputs?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Enable or disable output recording. Enabled if `dataCollection.genAI.outputs` (or the deprecated `sendDefaultPii` option) is `true`
|
|
48
|
-
* or if you set `isEnabled` to `true` in your ai SDK method telemetry settings.
|
|
49
|
-
* Integration-level options take precedence over global `dataCollection` config.
|
|
50
|
-
*/
|
|
51
|
-
recordOutputs?: boolean;
|
|
40
|
+
export interface VercelAiOptions extends VercelAiBaseOptions {
|
|
52
41
|
/**
|
|
53
42
|
* By default, the instrumentation will register span processors only when the ai package is used.
|
|
54
43
|
* If you want to register the span processors even when the ai package usage cannot be detected, you can set `force` to `true`.
|
|
55
44
|
*/
|
|
56
45
|
force?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Enable or disable truncation of recorded input messages.
|
|
59
|
-
* Defaults to `true`.
|
|
60
|
-
*/
|
|
61
|
-
enableTruncation?: boolean;
|
|
62
46
|
}
|
|
63
47
|
export interface VercelAiIntegration extends Integration {
|
|
64
48
|
options: VercelAiOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/vercelai/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/vercelai/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,MAAM,cAAc,GAC9B,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,GAChC,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,GAChC,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;AAEtC,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,OAAO,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -7,6 +7,24 @@ import type { NodeOptions } from '../types';
|
|
|
7
7
|
export declare function getDefaultIntegrationsWithoutPerformance(): Integration[];
|
|
8
8
|
/** Get the default integrations for the Node SDK. */
|
|
9
9
|
export declare function getDefaultIntegrations(options: Options): Integration[];
|
|
10
|
+
/**
|
|
11
|
+
* When the app opted into diagnostics-channel injection (via
|
|
12
|
+
* `experimentalUseDiagnosticsChannelInjection()`) AND span recording is enabled, drop the OTel
|
|
13
|
+
* integrations that have a channel-based replacement and append the FULL channel-integration set,
|
|
14
|
+
* so the two never both instrument the same library. Otherwise returns `integrations` unchanged.
|
|
15
|
+
*
|
|
16
|
+
* `_init` applies the same swap to `defaultIntegrations`, but SDKs that seed their integrations
|
|
17
|
+
* through the user `integrations` option instead (e.g. the `@sentry/aws-serverless` Lambda layer
|
|
18
|
+
* entry) never hit that path, so they call this directly from their own `getDefaultIntegrations`.
|
|
19
|
+
*
|
|
20
|
+
* Note the asymmetry: appended channel integrations are not limited to ones whose OTel counterpart
|
|
21
|
+
* was in `integrations`. For `@sentry/node` that makes no difference (the incoming list carries the
|
|
22
|
+
* whole OTel performance set), but a caller with a narrower list (e.g. `@sentry/aws-serverless`)
|
|
23
|
+
* gains channel coverage for libraries it never shipped OTel integrations for. Channel integrations
|
|
24
|
+
* produce nothing but spans, so this is gated on span recording. Exported so SDKs that build their
|
|
25
|
+
* own default-integration set can apply the same logic instead of duplicating it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyDiagnosticsChannelInjectionIntegrations(integrations: Integration[], options: Options): Integration[];
|
|
10
28
|
/**
|
|
11
29
|
* Initialize Sentry for Node.
|
|
12
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AASpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAO5C;;GAEG;AACH,wBAAgB,wCAAwC,IAAI,WAAW,EAAE,CAOxE;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAStE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAElF;AAsED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAE5G"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AASpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAO5C;;GAEG;AACH,wBAAgB,wCAAwC,IAAI,WAAW,EAAE,CAOxE;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAStE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4CAA4C,CAC1D,YAAY,EAAE,WAAW,EAAE,EAC3B,OAAO,EAAE,OAAO,GACf,WAAW,EAAE,CASf;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAElF;AAsED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAE5G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAEL,KAAK,UAAU,EAGhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,uBAAuB,EAG5B,KAAK,2BAA2B,EAMjC,MAAM,uBAAuB,CAAC;AA8D/B,UAAU,8BAA8B;IACtC,8DAA8D;IAC9D,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,IAAI,CAQxG;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAiB3E;AAgBD,+BAA+B;AAC/B,wBAAgB,SAAS,CACvB,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,8BAAmC,GAC3C,CAAC,2BAA2B,GAAG,SAAS,EAAE,uBAAuB,GAAG,SAAS,CAAC,CAkChF;AAqDD,+BAA+B;AAC/B,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtG"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export type IORedisCommandArgs = Array<string | Buffer | number | unknown[]>;
|
|
2
2
|
export declare const GET_COMMANDS: string[];
|
|
3
3
|
export declare const SET_COMMANDS: string[];
|
|
4
|
+
export declare const REMOVE_COMMANDS: string[];
|
|
4
5
|
/** Checks if a given command is in the list of redis commands.
|
|
5
6
|
* Useful because commands can come in lowercase or uppercase (depending on the library). */
|
|
6
7
|
export declare function isInCommands(redisCommands: string[], command: string): boolean;
|
|
7
8
|
/** Determine cache operation based on redis statement */
|
|
8
|
-
export declare function getCacheOperation(command: string): 'cache.get' | 'cache.put' | 'cache.remove' |
|
|
9
|
+
export declare function getCacheOperation(command: string): 'cache.get' | 'cache.put' | 'cache.remove' | undefined;
|
|
9
10
|
/** Safely converts a redis key to a string (comma-separated if there are multiple keys) */
|
|
10
11
|
export declare function getCacheKeySafely(redisCommand: string, cmdArgs: IORedisCommandArgs): string[] | undefined;
|
|
11
12
|
/** Determines whether a redis operation should be considered as "cache operation" by checking if a key is prefixed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redisCache.d.ts","sourceRoot":"","sources":["../../../src/utils/redisCache.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC,CAAC;AAI7E,eAAO,MAAM,YAAY,UAAkB,CAAC;AAC5C,eAAO,MAAM,YAAY,UAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"redisCache.d.ts","sourceRoot":"","sources":["../../../src/utils/redisCache.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC,CAAC;AAI7E,eAAO,MAAM,YAAY,UAAkB,CAAC;AAC5C,eAAO,MAAM,YAAY,UAAmB,CAAC;AAC7C,eAAO,MAAM,eAAe,UAAoB,CAAC;AAGjD;6FAC6F;AAC7F,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE9E;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,CAUzG;AAMD,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,EAAE,GAAG,SAAS,CA0BzG;AAED;uEACuE;AACvE,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAWxG;AAED,wDAAwD;AACxD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAmB5E"}
|
|
@@ -31,14 +31,14 @@ export { langChainIntegration } from './integrations/tracing/langchain';
|
|
|
31
31
|
export { langGraphIntegration } from './integrations/tracing/langgraph';
|
|
32
32
|
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, growthbookIntegration, } from './integrations/featureFlagShims';
|
|
33
33
|
export { firebaseIntegration } from './integrations/tracing/firebase';
|
|
34
|
-
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
|
|
34
|
+
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, applyDiagnosticsChannelInjectionIntegrations, } from './sdk';
|
|
35
35
|
export { experimentalUseDiagnosticsChannelInjection, diagnosticsChannelInjectionIntegrations, } from './sdk/experimentalUseDiagnosticsChannelInjection';
|
|
36
36
|
export { isDiagnosticsChannelInjectionEnabled } from './sdk/diagnosticsChannelInjection';
|
|
37
37
|
export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
38
38
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
39
39
|
export { NodeOptions } from './types';
|
|
40
40
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
41
|
-
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, wrapMcpServerWithSentry, featureFlagsIntegration, spanStreamingIntegration, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
|
|
41
|
+
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, wrapMcpServerWithSentry, featureFlagsIntegration, spanStreamingIntegration, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentStateGraph, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
|
|
42
42
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, Metric, Log, LogSeverityLevel, FeatureFlagsIntegration, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
|
|
43
43
|
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, nodeRuntimeMetricsIntegration, NodeRuntimeMetricsOptions, consoleIntegration, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, withStreamedSpan, _INTERNAL_normalizeCollectionInterval } from '@sentry/node-core';
|
|
44
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { Span, SpanAttributes } from '@sentry/core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
export declare function
|
|
8
|
-
/**
|
|
9
|
-
* Determine a span's attributes by fetching related metadata from the v4 connection context.
|
|
10
|
-
*/
|
|
11
|
-
export declare function getV4SpanAttributes(connectionCtx: any, ns: MongodbNamespace, command?: any, operation?: string): SpanAttributes;
|
|
12
|
-
/**
|
|
13
|
-
* Determine a span's attributes by fetching related metadata from the v3 topology.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getV3SpanAttributes(ns: string, topology: MongoInternalTopology, command?: MongoInternalCommand, operation?: string | undefined): SpanAttributes;
|
|
16
|
-
export declare function startMongoSpan(attributes: SpanAttributes): Span;
|
|
2
|
+
import { getV3CommandOperation, startMongoSpan } from '@sentry/server-utils';
|
|
3
|
+
export { getV3CommandOperation, startMongoSpan };
|
|
4
|
+
/** Determine a span's attributes from the v4 connection context (OTel origin). */
|
|
5
|
+
export declare function getV4SpanAttributes(connectionCtx: any, ns: any, command?: any, operation?: string): SpanAttributes;
|
|
6
|
+
/** Determine a span's attributes from the v3 topology (OTel origin). */
|
|
7
|
+
export declare function getV3SpanAttributes(ns: string, topology: any, command?: any, operation?: string): SpanAttributes;
|
|
17
8
|
/**
|
|
18
9
|
* Wraps the result handler so it ends the span (with error status on failure) and runs the
|
|
19
10
|
* original callback re-activated under the parent span — mongodb loses the async context when
|
|
@@ -13,7 +13,6 @@ export declare class MongooseInstrumentation extends InstrumentationBase<Instrum
|
|
|
13
13
|
private patchModelStatic;
|
|
14
14
|
private patchModelAggregate;
|
|
15
15
|
private patchAndCaptureSpanContext;
|
|
16
|
-
private _startSpan;
|
|
17
16
|
private _handleResponse;
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=mongoose.d.ts.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Span
|
|
2
|
-
import { Collection } from './mongoose-types';
|
|
3
|
-
export declare function getAttributesFromCollection(collection: Collection): SpanAttributes;
|
|
1
|
+
import { Span } from '@sentry/core';
|
|
4
2
|
export declare function handlePromiseResponse(execResponse: any, span: Span): any;
|
|
5
3
|
export declare function handleCallbackResponse(callback: Function, exec: Function, originalThis: any, span: Span, args: IArguments): any;
|
|
6
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Integration } from '@sentry/core';
|
|
2
|
+
import { VercelAiOptions as VercelAiBaseOptions } from '@sentry/server-utils';
|
|
2
3
|
/**
|
|
3
4
|
* Telemetry configuration.
|
|
4
5
|
*/
|
|
@@ -36,29 +37,12 @@ export type TelemetrySettings = {
|
|
|
36
37
|
* null or undefined attribute values are invalid and will result in undefined behavior.
|
|
37
38
|
*/
|
|
38
39
|
export declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
39
|
-
export interface VercelAiOptions {
|
|
40
|
-
/**
|
|
41
|
-
* Enable or disable input recording. Enabled if `dataCollection.genAI.inputs` (or the deprecated `sendDefaultPii` option) is `true`
|
|
42
|
-
* or if you set `isEnabled` to `true` in your ai SDK method telemetry settings.
|
|
43
|
-
* Integration-level options take precedence over global `dataCollection` config.
|
|
44
|
-
*/
|
|
45
|
-
recordInputs?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Enable or disable output recording. Enabled if `dataCollection.genAI.outputs` (or the deprecated `sendDefaultPii` option) is `true`
|
|
48
|
-
* or if you set `isEnabled` to `true` in your ai SDK method telemetry settings.
|
|
49
|
-
* Integration-level options take precedence over global `dataCollection` config.
|
|
50
|
-
*/
|
|
51
|
-
recordOutputs?: boolean;
|
|
40
|
+
export interface VercelAiOptions extends VercelAiBaseOptions {
|
|
52
41
|
/**
|
|
53
42
|
* By default, the instrumentation will register span processors only when the ai package is used.
|
|
54
43
|
* If you want to register the span processors even when the ai package usage cannot be detected, you can set `force` to `true`.
|
|
55
44
|
*/
|
|
56
45
|
force?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Enable or disable truncation of recorded input messages.
|
|
59
|
-
* Defaults to `true`.
|
|
60
|
-
*/
|
|
61
|
-
enableTruncation?: boolean;
|
|
62
46
|
}
|
|
63
47
|
export interface VercelAiIntegration extends Integration {
|
|
64
48
|
options: VercelAiOptions;
|
|
@@ -7,6 +7,24 @@ import { NodeOptions } from '../types';
|
|
|
7
7
|
export declare function getDefaultIntegrationsWithoutPerformance(): Integration[];
|
|
8
8
|
/** Get the default integrations for the Node SDK. */
|
|
9
9
|
export declare function getDefaultIntegrations(options: Options): Integration[];
|
|
10
|
+
/**
|
|
11
|
+
* When the app opted into diagnostics-channel injection (via
|
|
12
|
+
* `experimentalUseDiagnosticsChannelInjection()`) AND span recording is enabled, drop the OTel
|
|
13
|
+
* integrations that have a channel-based replacement and append the FULL channel-integration set,
|
|
14
|
+
* so the two never both instrument the same library. Otherwise returns `integrations` unchanged.
|
|
15
|
+
*
|
|
16
|
+
* `_init` applies the same swap to `defaultIntegrations`, but SDKs that seed their integrations
|
|
17
|
+
* through the user `integrations` option instead (e.g. the `@sentry/aws-serverless` Lambda layer
|
|
18
|
+
* entry) never hit that path, so they call this directly from their own `getDefaultIntegrations`.
|
|
19
|
+
*
|
|
20
|
+
* Note the asymmetry: appended channel integrations are not limited to ones whose OTel counterpart
|
|
21
|
+
* was in `integrations`. For `@sentry/node` that makes no difference (the incoming list carries the
|
|
22
|
+
* whole OTel performance set), but a caller with a narrower list (e.g. `@sentry/aws-serverless`)
|
|
23
|
+
* gains channel coverage for libraries it never shipped OTel integrations for. Channel integrations
|
|
24
|
+
* produce nothing but spans, so this is gated on span recording. Exported so SDKs that build their
|
|
25
|
+
* own default-integration set can apply the same logic instead of duplicating it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyDiagnosticsChannelInjectionIntegrations(integrations: Integration[], options: Options): Integration[];
|
|
10
28
|
/**
|
|
11
29
|
* Initialize Sentry for Node.
|
|
12
30
|
*/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export type IORedisCommandArgs = Array<string | Buffer | number | unknown[]>;
|
|
2
2
|
export declare const GET_COMMANDS: string[];
|
|
3
3
|
export declare const SET_COMMANDS: string[];
|
|
4
|
+
export declare const REMOVE_COMMANDS: string[];
|
|
4
5
|
/** Checks if a given command is in the list of redis commands.
|
|
5
6
|
* Useful because commands can come in lowercase or uppercase (depending on the library). */
|
|
6
7
|
export declare function isInCommands(redisCommands: string[], command: string): boolean;
|
|
7
8
|
/** Determine cache operation based on redis statement */
|
|
8
|
-
export declare function getCacheOperation(command: string): 'cache.get' | 'cache.put' | 'cache.remove' |
|
|
9
|
+
export declare function getCacheOperation(command: string): 'cache.get' | 'cache.put' | 'cache.remove' | undefined;
|
|
9
10
|
/** Safely converts a redis key to a string (comma-separated if there are multiple keys) */
|
|
10
11
|
export declare function getCacheKeySafely(redisCommand: string, cmdArgs: IORedisCommandArgs): string[] | undefined;
|
|
11
12
|
/** Determines whether a redis operation should be considered as "cache operation" by checking if a key is prefixed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.68.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",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"@opentelemetry/instrumentation": "^0.220.0",
|
|
70
70
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
71
71
|
"@sentry/conventions": "^0.16.0",
|
|
72
|
-
"@sentry/core": "10.
|
|
73
|
-
"@sentry/node-core": "10.
|
|
74
|
-
"@sentry/opentelemetry": "10.
|
|
75
|
-
"@sentry/server-utils": "10.
|
|
72
|
+
"@sentry/core": "10.68.0",
|
|
73
|
+
"@sentry/node-core": "10.68.0",
|
|
74
|
+
"@sentry/opentelemetry": "10.68.0",
|
|
75
|
+
"@sentry/server-utils": "10.68.0",
|
|
76
76
|
"import-in-the-middle": "^3.0.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
var MongodbCommandType = /* @__PURE__ */ ((MongodbCommandType2) => {
|
|
4
|
-
MongodbCommandType2["CREATE_INDEXES"] = "createIndexes";
|
|
5
|
-
MongodbCommandType2["FIND_AND_MODIFY"] = "findAndModify";
|
|
6
|
-
MongodbCommandType2["IS_MASTER"] = "isMaster";
|
|
7
|
-
MongodbCommandType2["COUNT"] = "count";
|
|
8
|
-
MongodbCommandType2["AGGREGATE"] = "aggregate";
|
|
9
|
-
MongodbCommandType2["UNKNOWN"] = "unknown";
|
|
10
|
-
return MongodbCommandType2;
|
|
11
|
-
})(MongodbCommandType || {});
|
|
12
|
-
|
|
13
|
-
exports.MongodbCommandType = MongodbCommandType;
|
|
14
|
-
//# sourceMappingURL=internal-types.js.map
|