@sentry/node 9.6.0-alpha.0 → 9.6.1

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.
Files changed (40) hide show
  1. package/build/cjs/index.js +0 -1
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/anr/index.js +1 -1
  4. package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
  5. package/build/cjs/integrations/tracing/graphql.js +0 -3
  6. package/build/cjs/integrations/tracing/graphql.js.map +1 -1
  7. package/build/cjs/integrations/tracing/index.js +9 -9
  8. package/build/cjs/integrations/tracing/index.js.map +1 -1
  9. package/build/cjs/sdk/index.js +8 -8
  10. package/build/cjs/sdk/index.js.map +1 -1
  11. package/build/cjs/sdk/initOtel.js +4 -5
  12. package/build/cjs/sdk/initOtel.js.map +1 -1
  13. package/build/esm/index.js +1 -1
  14. package/build/esm/integrations/anr/index.js +2 -2
  15. package/build/esm/integrations/anr/worker-script.js +2 -2
  16. package/build/esm/integrations/console.js +1 -1
  17. package/build/esm/integrations/fs.js +1 -1
  18. package/build/esm/integrations/http/SentryHttpInstrumentation.js +1 -1
  19. package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
  20. package/build/esm/integrations/local-variables/worker-script.js +2 -2
  21. package/build/esm/integrations/tracing/connect.js +1 -1
  22. package/build/esm/integrations/tracing/express.js +1 -1
  23. package/build/esm/integrations/tracing/fastify.js +1 -1
  24. package/build/esm/integrations/tracing/graphql.js +1 -4
  25. package/build/esm/integrations/tracing/graphql.js.map +1 -1
  26. package/build/esm/integrations/tracing/hapi/index.js +1 -1
  27. package/build/esm/integrations/tracing/index.js +18 -18
  28. package/build/esm/integrations/tracing/koa.js +1 -1
  29. package/build/esm/integrations/tracing/redis.js +1 -1
  30. package/build/esm/package.json +1 -1
  31. package/build/esm/sdk/client.js +1 -1
  32. package/build/esm/sdk/index.js +1 -1
  33. package/build/esm/sdk/initOtel.js +8 -9
  34. package/build/esm/sdk/initOtel.js.map +1 -1
  35. package/build/types/index.d.ts +1 -1
  36. package/build/types/index.d.ts.map +1 -1
  37. package/build/types/integrations/tracing/graphql.d.ts.map +1 -1
  38. package/build/types/sdk/initOtel.d.ts.map +1 -1
  39. package/build/types-ts3.8/index.d.ts +1 -1
  40. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';
2
- import { defineIntegration, spanToJSON, getRootSpan } from '@sentry/core';
2
+ import { spanToJSON, getRootSpan, defineIntegration } from '@sentry/core';
3
3
  import { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from '@sentry/opentelemetry';
4
4
  import { generateInstrumentOnce } from '../../otel/instrument.js';
5
5
  import { addOriginToSpan } from '../../utils/addOriginToSpan.js';
@@ -24,9 +24,6 @@ const instrumentGraphql = generateInstrumentOnce(
24
24
 
25
25
  if (options.useOperationNameForRootSpan && operationType) {
26
26
  const rootSpan = getRootSpan(span);
27
-
28
- // We guard to only do this on http.server spans
29
-
30
27
  const rootSpanAttributes = spanToJSON(rootSpan).data;
31
28
 
32
29
  const existingOperations = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","sources":["../../../../src/integrations/tracing/graphql.ts"],"sourcesContent":["import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';\nimport { defineIntegration, getRootSpan, spanToJSON } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from '@sentry/opentelemetry';\nimport { generateInstrumentOnce } from '../../otel/instrument';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\ninterface GraphqlOptions {\n /**\n * Do not create spans for resolvers.\n *\n * Defaults to true.\n */\n ignoreResolveSpans?: boolean;\n\n /**\n * Don't create spans for the execution of the default resolver on object properties.\n *\n * When a resolver function is not defined on the schema for a field, graphql will\n * use the default resolver which just looks for a property with that name on the object.\n * If the property is not a function, it's not very interesting to trace.\n * This option can reduce noise and number of spans created.\n *\n * Defaults to true.\n */\n ignoreTrivialResolveSpans?: boolean;\n\n /**\n * If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.\n * Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.\n *\n * Defaults to true.\n */\n useOperationNameForRootSpan?: boolean;\n}\n\nconst INTEGRATION_NAME = 'Graphql';\n\nexport const instrumentGraphql = generateInstrumentOnce<GraphqlOptions>(\n INTEGRATION_NAME,\n (_options: GraphqlOptions = {}) => {\n const options = getOptionsWithDefaults(_options);\n\n return new GraphQLInstrumentation({\n ...options,\n responseHook(span) {\n addOriginToSpan(span, 'auto.graphql.otel.graphql');\n\n const attributes = spanToJSON(span).data;\n\n // If operation.name is not set, we fall back to use operation.type only\n const operationType = attributes['graphql.operation.type'];\n const operationName = attributes['graphql.operation.name'];\n\n if (options.useOperationNameForRootSpan && operationType) {\n const rootSpan = getRootSpan(span);\n\n // We guard to only do this on http.server spans\n\n const rootSpanAttributes = spanToJSON(rootSpan).data;\n\n const existingOperations = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];\n\n const newOperation = operationName ? `${operationType} ${operationName}` : `${operationType}`;\n\n // We keep track of each operation on the root span\n // This can either be a string, or an array of strings (if there are multiple operations)\n if (Array.isArray(existingOperations)) {\n (existingOperations as string[]).push(newOperation);\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, existingOperations);\n } else if (typeof existingOperations === 'string') {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, [existingOperations, newOperation]);\n } else {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, newOperation);\n }\n }\n },\n });\n },\n);\n\nconst _graphqlIntegration = ((options: GraphqlOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // We set defaults here, too, because otherwise we'd update the instrumentation config\n // to the config without defaults, as `generateInstrumentOnce` automatically calls `setConfig(options)`\n // when being called the second time\n instrumentGraphql(getOptionsWithDefaults(options));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.\n *\n * For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).\n *\n * @param {GraphqlOptions} options Configuration options for the GraphQL integration.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.graphqlIntegration()],\n * });\n */\nexport const graphqlIntegration = defineIntegration(_graphqlIntegration);\n\nfunction getOptionsWithDefaults(options?: GraphqlOptions): GraphqlOptions {\n return {\n ignoreResolveSpans: true,\n ignoreTrivialResolveSpans: true,\n useOperationNameForRootSpan: true,\n ...options,\n };\n}\n"],"names":[],"mappings":";;;;;;AAqCA,MAAM,gBAAA,GAAmB,SAAS;;AAE3B,MAAM,iBAAkB,GAAE,sBAAsB;AACvD,EAAE,gBAAgB;AAClB,EAAE,CAAC,QAAQ,GAAmB,EAAE,KAAK;AACrC,IAAI,MAAM,OAAQ,GAAE,sBAAsB,CAAC,QAAQ,CAAC;;AAEpD,IAAI,OAAO,IAAI,sBAAsB,CAAC;AACtC,MAAM,GAAG,OAAO;AAChB,MAAM,YAAY,CAAC,IAAI,EAAE;AACzB,QAAQ,eAAe,CAAC,IAAI,EAAE,2BAA2B,CAAC;;AAE1D,QAAQ,MAAM,aAAa,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI;;AAEhD;AACA,QAAQ,MAAM,aAAc,GAAE,UAAU,CAAC,wBAAwB,CAAC;AAClE,QAAQ,MAAM,aAAc,GAAE,UAAU,CAAC,wBAAwB,CAAC;;AAElE,QAAQ,IAAI,OAAO,CAAC,2BAA4B,IAAG,aAAa,EAA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ACA,IAAA,yBAAA,EAAA,IAAA;AACA,IAAA,2BAAA,EAAA,IAAA;AACA,IAAA,GAAA,OAAA;AACA,GAAA;AACA;;;;"}
1
+ {"version":3,"file":"graphql.js","sources":["../../../../src/integrations/tracing/graphql.ts"],"sourcesContent":["import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';\nimport { defineIntegration, getRootSpan, spanToJSON } from '@sentry/core';\nimport type { IntegrationFn } from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from '@sentry/opentelemetry';\nimport { generateInstrumentOnce } from '../../otel/instrument';\n\nimport { addOriginToSpan } from '../../utils/addOriginToSpan';\n\ninterface GraphqlOptions {\n /**\n * Do not create spans for resolvers.\n *\n * Defaults to true.\n */\n ignoreResolveSpans?: boolean;\n\n /**\n * Don't create spans for the execution of the default resolver on object properties.\n *\n * When a resolver function is not defined on the schema for a field, graphql will\n * use the default resolver which just looks for a property with that name on the object.\n * If the property is not a function, it's not very interesting to trace.\n * This option can reduce noise and number of spans created.\n *\n * Defaults to true.\n */\n ignoreTrivialResolveSpans?: boolean;\n\n /**\n * If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.\n * Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.\n *\n * Defaults to true.\n */\n useOperationNameForRootSpan?: boolean;\n}\n\nconst INTEGRATION_NAME = 'Graphql';\n\nexport const instrumentGraphql = generateInstrumentOnce<GraphqlOptions>(\n INTEGRATION_NAME,\n (_options: GraphqlOptions = {}) => {\n const options = getOptionsWithDefaults(_options);\n\n return new GraphQLInstrumentation({\n ...options,\n responseHook(span) {\n addOriginToSpan(span, 'auto.graphql.otel.graphql');\n\n const attributes = spanToJSON(span).data;\n\n // If operation.name is not set, we fall back to use operation.type only\n const operationType = attributes['graphql.operation.type'];\n const operationName = attributes['graphql.operation.name'];\n\n if (options.useOperationNameForRootSpan && operationType) {\n const rootSpan = getRootSpan(span);\n const rootSpanAttributes = spanToJSON(rootSpan).data;\n\n const existingOperations = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];\n\n const newOperation = operationName ? `${operationType} ${operationName}` : `${operationType}`;\n\n // We keep track of each operation on the root span\n // This can either be a string, or an array of strings (if there are multiple operations)\n if (Array.isArray(existingOperations)) {\n (existingOperations as string[]).push(newOperation);\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, existingOperations);\n } else if (typeof existingOperations === 'string') {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, [existingOperations, newOperation]);\n } else {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, newOperation);\n }\n }\n },\n });\n },\n);\n\nconst _graphqlIntegration = ((options: GraphqlOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // We set defaults here, too, because otherwise we'd update the instrumentation config\n // to the config without defaults, as `generateInstrumentOnce` automatically calls `setConfig(options)`\n // when being called the second time\n instrumentGraphql(getOptionsWithDefaults(options));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.\n *\n * For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).\n *\n * @param {GraphqlOptions} options Configuration options for the GraphQL integration.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.graphqlIntegration()],\n * });\n */\nexport const graphqlIntegration = defineIntegration(_graphqlIntegration);\n\nfunction getOptionsWithDefaults(options?: GraphqlOptions): GraphqlOptions {\n return {\n ignoreResolveSpans: true,\n ignoreTrivialResolveSpans: true,\n useOperationNameForRootSpan: true,\n ...options,\n };\n}\n"],"names":[],"mappings":";;;;;;AAqCA,MAAM,gBAAA,GAAmB,SAAS;;AAE3B,MAAM,iBAAkB,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,CAAA,2CAAA,EAAA,YAAA,CAAA;AACA;AACA;AACA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA;;AAEA,MAAA,mBAAA,IAAA,CAAA,OAAA,GAAA,EAAA,KAAA;AACA,EAAA,OAAA;AACA,IAAA,IAAA,EAAA,gBAAA;AACA,IAAA,SAAA,GAAA;AACA;AACA;AACA;AACA,MAAA,iBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA,CAAA,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,kBAAA,GAAA,iBAAA,CAAA,mBAAA;;AAEA,SAAA,sBAAA,CAAA,OAAA,EAAA;AACA,EAAA,OAAA;AACA,IAAA,kBAAA,EAAA,IAAA;AACA,IAAA,yBAAA,EAAA,IAAA;AACA,IAAA,2BAAA,EAAA,IAAA;AACA,IAAA,GAAA,OAAA;AACA,GAAA;AACA;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';
2
- import { defineIntegration, getClient, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SDK_VERSION, getIsolationScope, getDefaultIsolationScope, logger, captureException } from '@sentry/core';
2
+ import { defineIntegration, SDK_VERSION, getClient, getIsolationScope, getDefaultIsolationScope, logger, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, captureException } from '@sentry/core';
3
3
  import { DEBUG_BUILD } from '../../../debug-build.js';
4
4
  import { generateInstrumentOnce } from '../../../otel/instrument.js';
5
5
  import { ensureIsWrapped } from '../../../utils/ensureIsWrapped.js';
@@ -1,22 +1,22 @@
1
1
  import { instrumentOtelHttp } from '../http/index.js';
2
- import { amqplibIntegration, instrumentAmqplib } from './amqplib.js';
3
- import { connectIntegration, instrumentConnect } from './connect.js';
4
- import { expressIntegration, instrumentExpress, instrumentExpressV5 } from './express.js';
5
- import { fastifyIntegration, instrumentFastify } from './fastify.js';
6
- import { genericPoolIntegration, instrumentGenericPool } from './genericPool.js';
7
- import { graphqlIntegration, instrumentGraphql } from './graphql.js';
8
- import { hapiIntegration, instrumentHapi } from './hapi/index.js';
9
- import { kafkaIntegration, instrumentKafka } from './kafka.js';
10
- import { koaIntegration, instrumentKoa } from './koa.js';
11
- import { lruMemoizerIntegration, instrumentLruMemoizer } from './lrumemoizer.js';
12
- import { mongoIntegration, instrumentMongo } from './mongo.js';
13
- import { mongooseIntegration, instrumentMongoose } from './mongoose.js';
14
- import { mysqlIntegration, instrumentMysql } from './mysql.js';
15
- import { mysql2Integration, instrumentMysql2 } from './mysql2.js';
16
- import { postgresIntegration, instrumentPostgres } from './postgres.js';
17
- import { redisIntegration, instrumentRedis } from './redis.js';
18
- import { tediousIntegration, instrumentTedious } from './tedious.js';
19
- import { vercelAIIntegration, instrumentVercelAi } from './vercelai/index.js';
2
+ import { instrumentAmqplib, amqplibIntegration } from './amqplib.js';
3
+ import { instrumentConnect, connectIntegration } from './connect.js';
4
+ import { instrumentExpress, instrumentExpressV5, expressIntegration } from './express.js';
5
+ import { instrumentFastify, fastifyIntegration } from './fastify.js';
6
+ import { instrumentGenericPool, genericPoolIntegration } from './genericPool.js';
7
+ import { instrumentGraphql, graphqlIntegration } from './graphql.js';
8
+ import { instrumentHapi, hapiIntegration } from './hapi/index.js';
9
+ import { instrumentKafka, kafkaIntegration } from './kafka.js';
10
+ import { instrumentKoa, koaIntegration } from './koa.js';
11
+ import { instrumentLruMemoizer, lruMemoizerIntegration } from './lrumemoizer.js';
12
+ import { instrumentMongo, mongoIntegration } from './mongo.js';
13
+ import { instrumentMongoose, mongooseIntegration } from './mongoose.js';
14
+ import { instrumentMysql, mysqlIntegration } from './mysql.js';
15
+ import { instrumentMysql2, mysql2Integration } from './mysql2.js';
16
+ import { instrumentPostgres, postgresIntegration } from './postgres.js';
17
+ import { instrumentRedis, redisIntegration } from './redis.js';
18
+ import { instrumentTedious, tediousIntegration } from './tedious.js';
19
+ import { instrumentVercelAi, vercelAIIntegration } from './vercelai/index.js';
20
20
 
21
21
  /**
22
22
  * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
@@ -1,6 +1,6 @@
1
1
  import { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';
2
2
  import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';
3
- import { defineIntegration, getIsolationScope, getDefaultIsolationScope, logger, spanToJSON, captureException, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
3
+ import { getIsolationScope, getDefaultIsolationScope, logger, spanToJSON, defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, captureException } from '@sentry/core';
4
4
  import { DEBUG_BUILD } from '../../debug-build.js';
5
5
  import { generateInstrumentOnce } from '../../otel/instrument.js';
6
6
  import { ensureIsWrapped } from '../../utils/ensureIsWrapped.js';
@@ -1,6 +1,6 @@
1
1
  import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis';
2
2
  import { RedisInstrumentation } from '@opentelemetry/instrumentation-redis-4';
3
- import { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_CACHE_KEY, truncate } from '@sentry/core';
3
+ import { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_SENTRY_OP, truncate } from '@sentry/core';
4
4
  import { generateInstrumentOnce } from '../../otel/instrument.js';
5
5
  import { getCacheKeySafely, getCacheOperation, shouldConsiderForCache, calculateCacheItemSize, isInCommands, GET_COMMANDS } from '../../utils/redisCache.js';
6
6
 
@@ -1 +1 @@
1
- {"type":"module","version":"9.6.0-alpha.0","sideEffects":false}
1
+ {"type":"module","version":"9.6.1","sideEffects":false}
@@ -3,7 +3,7 @@ import { trace } from '@opentelemetry/api';
3
3
  import { registerInstrumentations } from '@opentelemetry/instrumentation';
4
4
  import { ServerRuntimeClient, applySdkMetadata, logger, SDK_VERSION } from '@sentry/core';
5
5
  import { getTraceContextForScope } from '@sentry/opentelemetry';
6
- import { isMainThread, threadId } from 'worker_threads';
6
+ import { threadId, isMainThread } from 'worker_threads';
7
7
  import { DEBUG_BUILD } from '../debug-build.js';
8
8
 
9
9
  const DEFAULT_CLIENT_REPORT_FLUSH_INTERVAL_MS = 60000; // 60s was chosen arbitrarily
@@ -1,4 +1,4 @@
1
- import { inboundFiltersIntegration, functionToStringIntegration, linkedErrorsIntegration, requestDataIntegration, hasSpansEnabled, logger, consoleSandbox, getCurrentScope, dropUndefinedKeys, stackParserFromStackParserOptions, getIntegrationsToSetup, propagationContextFromHeaders } from '@sentry/core';
1
+ import { logger, consoleSandbox, getCurrentScope, dropUndefinedKeys, getIntegrationsToSetup, stackParserFromStackParserOptions, propagationContextFromHeaders, hasSpansEnabled, inboundFiltersIntegration, functionToStringIntegration, linkedErrorsIntegration, requestDataIntegration } from '@sentry/core';
2
2
  import { setOpenTelemetryContextAsyncContextStrategy, enhanceDscWithOpenTelemetryRootSpanName, setupEventContextTrace, openTelemetrySetupCheck } from '@sentry/opentelemetry';
3
3
  import { DEBUG_BUILD } from '../debug-build.js';
4
4
  import { childProcessIntegration } from '../integrations/childProcess.js';
@@ -1,10 +1,10 @@
1
1
  import moduleModule from 'module';
2
- import { diag, DiagLogLevel } from '@opentelemetry/api';
2
+ import { diag, DiagLogLevel, trace, propagation, context } from '@opentelemetry/api';
3
3
  import { Resource } from '@opentelemetry/resources';
4
4
  import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
5
- import { ATTR_SERVICE_NAME, SEMRESATTRS_SERVICE_NAMESPACE, ATTR_SERVICE_VERSION } from '@opentelemetry/semantic-conventions';
6
- import { logger, SDK_VERSION, GLOBAL_OBJ, consoleSandbox } from '@sentry/core';
7
- import { SentrySampler, SentrySpanProcessor, SentryPropagator } from '@sentry/opentelemetry';
5
+ import { ATTR_SERVICE_VERSION, SEMRESATTRS_SERVICE_NAMESPACE, ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
6
+ import { GLOBAL_OBJ, logger, consoleSandbox, SDK_VERSION } from '@sentry/core';
7
+ import { SentrySpanProcessor, SentrySampler, SentryPropagator } from '@sentry/opentelemetry';
8
8
  import { createAddHookMessageChannel } from 'import-in-the-middle';
9
9
  import { DEBUG_BUILD } from '../debug-build.js';
10
10
  import { getOpenTelemetryInstrumentationToPreload } from '../integrations/tracing/index.js';
@@ -111,11 +111,10 @@ function setupOtel(client, options = {}) {
111
111
  ],
112
112
  });
113
113
 
114
- // Initialize the provider
115
- provider.register({
116
- propagator: new SentryPropagator(),
117
- contextManager: new SentryContextManager(),
118
- });
114
+ // Register as globals
115
+ trace.setGlobalTracerProvider(provider);
116
+ propagation.setGlobalPropagator(new SentryPropagator());
117
+ context.setGlobalContextManager(new SentryContextManager());
119
118
 
120
119
  return provider;
121
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"initOtel.js","sources":["../../../src/sdk/initOtel.ts"],"sourcesContent":["import moduleModule from 'module';\nimport { DiagLogLevel, diag } from '@opentelemetry/api';\nimport { Resource } from '@opentelemetry/resources';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-base';\nimport { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';\nimport {\n ATTR_SERVICE_NAME,\n ATTR_SERVICE_VERSION,\n SEMRESATTRS_SERVICE_NAMESPACE,\n} from '@opentelemetry/semantic-conventions';\nimport { GLOBAL_OBJ, SDK_VERSION, consoleSandbox, logger } from '@sentry/core';\nimport { SentryPropagator, SentrySampler, SentrySpanProcessor } from '@sentry/opentelemetry';\nimport { createAddHookMessageChannel } from 'import-in-the-middle';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { getOpenTelemetryInstrumentationToPreload } from '../integrations/tracing';\nimport { SentryContextManager } from '../otel/contextManager';\nimport { isCjs } from '../utils/commonjs';\nimport type { NodeClient } from './client';\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 = setupOtel(client, options);\n client.traceProvider = provider;\n}\n\n/** Initialize the ESM loader. */\nexport function maybeInitializeEsmLoader(): void {\n const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);\n\n // Register hook was added in v20.6.0 and v18.19.0\n if (nodeMajor >= 22 || (nodeMajor === 20 && nodeMinor >= 6) || (nodeMajor === 18 && nodeMinor >= 19)) {\n if (!GLOBAL_OBJ._sentryEsmLoaderHookRegistered) {\n try {\n const { addHookMessagePort } = createAddHookMessageChannel();\n // @ts-expect-error register is available in these versions\n moduleModule.register('import-in-the-middle/hook.mjs', import.meta.url, {\n data: { addHookMessagePort, include: [] },\n transferList: [addHookMessagePort],\n });\n } catch (error) {\n logger.warn('Failed to register ESM hook', error);\n }\n }\n } else {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] You are using Node.js in ESM mode (\"import syntax\"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS (\"require() syntax\"), or upgrade your Node.js version.',\n );\n });\n }\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 logger.enable();\n setupOpenTelemetryLogger();\n }\n\n if (!isCjs()) {\n maybeInitializeEsmLoader();\n }\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 logger.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 return instruments.filter(instrumentation => integrationNames.includes(instrumentation.id));\n}\n\n/** Just exported for tests. */\nexport function setupOtel(client: NodeClient, options: AdditionalOpenTelemetryOptions = {}): BasicTracerProvider {\n // Create and configure NodeTracerProvider\n const provider = new BasicTracerProvider({\n sampler: new SentrySampler(client),\n resource: new Resource({\n [ATTR_SERVICE_NAME]: 'node',\n // eslint-disable-next-line deprecation/deprecation\n [SEMRESATTRS_SERVICE_NAMESPACE]: 'sentry',\n [ATTR_SERVICE_VERSION]: SDK_VERSION,\n }),\n forceFlushTimeoutMillis: 500,\n spanProcessors: [\n new SentrySpanProcessor({\n timeout: _clampSpanProcessorTimeout(client.getOptions().maxSpanWaitDuration),\n }),\n ...(options.spanProcessors || []),\n ],\n });\n\n // Initialize the provider\n provider.register({\n propagator: new SentryPropagator(),\n contextManager: new SentryContextManager(),\n });\n\n return provider;\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 logger.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 && logger.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.');\n return undefined;\n }\n\n return maxSpanWaitDuration;\n}\n\n/**\n * Setup the OTEL logger to use our own logger.\n */\nfunction setupOpenTelemetryLogger(): void {\n const otelLogger = new Proxy(logger as typeof logger & { verbose: (typeof logger)['debug'] }, {\n get(target, prop, receiver) {\n const actualProp = prop === 'verbose' ? 'debug' : prop;\n return Reflect.get(target, actualProp, receiver);\n },\n });\n\n // Disable diag, to ensure this works even if called multiple times\n diag.disable();\n diag.setLogger(otelLogger, DiagLogLevel.DEBUG);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmBA;AACA,MAAM,0BAAA,GAA6B,OAAS;;AAO5C;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,MAAM,EAAc,OAAO,GAAmC,EAAE,EAAQ;AAC1G,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE;AACjC,IAAI,wBAAwB,EAAE;AAC9B;;AAEA,EAAE,MAAM,WAAW,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7C,EAAE,MAAM,CAAC,aAAc,GAAE,QAAQ;AACjC;;AAEA;AACO,SAAS,wBAAwB,GAAS;AACjD,EAAE,MAAM,CAAC,SAAA,GAAY,CAAC,EAAE,SAAU,GAAE,CAAC,CAAA,GAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;;AAErF;AACA,EAAE,IAAI,SAAA,IAA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BAAoB,IAAG,IAAI,EAAE;AACnC,IAAI,OAAO,SAAS;AACpB;;AAEA;AACA;AACA,EAAE,IAAI,mBAAoB,GAAE,0BAA0B,EAAE;AACxD,IAAI,WAAY;AAChB,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,gEAAgE,EAAE,0BAA0B,CAAC,CAAA,CAAA;AACA,IAAA,OAAA,0BAAA;AACA,GAAA,MAAA,IAAA,mBAAA,IAAA,CAAA,IAAA,MAAA,CAAA,KAAA,CAAA,mBAAA,CAAA,EAAA;AACA,IAAA,WAAA,IAAA,MAAA,CAAA,IAAA,CAAA,+EAAA,CAAA;AACA,IAAA,OAAA,SAAA;AACA;;AAEA,EAAA,OAAA,mBAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,wBAAA,GAAA;AACA,EAAA,MAAA,UAAA,GAAA,IAAA,KAAA,CAAA,MAAA,GAAA;AACA,IAAA,GAAA,CAAA,MAAA,EAAA,IAAA,EAAA,QAAA,EAAA;AACA,MAAA,MAAA,UAAA,GAAA,IAAA,KAAA,SAAA,GAAA,OAAA,GAAA,IAAA;AACA,MAAA,OAAA,OAAA,CAAA,GAAA,CAAA,MAAA,EAAA,UAAA,EAAA,QAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA;;AAEA;AACA,EAAA,IAAA,CAAA,OAAA,EAAA;AACA,EAAA,IAAA,CAAA,SAAA,CAAA,UAAA,EAAA,YAAA,CAAA,KAAA,CAAA;AACA;;;;"}
1
+ {"version":3,"file":"initOtel.js","sources":["../../../src/sdk/initOtel.ts"],"sourcesContent":["import moduleModule from 'module';\nimport { DiagLogLevel, context, diag, propagation, trace } from '@opentelemetry/api';\nimport { Resource } from '@opentelemetry/resources';\nimport type { SpanProcessor } from '@opentelemetry/sdk-trace-base';\nimport { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';\nimport {\n ATTR_SERVICE_NAME,\n ATTR_SERVICE_VERSION,\n SEMRESATTRS_SERVICE_NAMESPACE,\n} from '@opentelemetry/semantic-conventions';\nimport { GLOBAL_OBJ, SDK_VERSION, consoleSandbox, logger } from '@sentry/core';\nimport { SentryPropagator, SentrySampler, SentrySpanProcessor } from '@sentry/opentelemetry';\nimport { createAddHookMessageChannel } from 'import-in-the-middle';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { getOpenTelemetryInstrumentationToPreload } from '../integrations/tracing';\nimport { SentryContextManager } from '../otel/contextManager';\nimport { isCjs } from '../utils/commonjs';\nimport type { NodeClient } from './client';\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 = setupOtel(client, options);\n client.traceProvider = provider;\n}\n\n/** Initialize the ESM loader. */\nexport function maybeInitializeEsmLoader(): void {\n const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);\n\n // Register hook was added in v20.6.0 and v18.19.0\n if (nodeMajor >= 22 || (nodeMajor === 20 && nodeMinor >= 6) || (nodeMajor === 18 && nodeMinor >= 19)) {\n if (!GLOBAL_OBJ._sentryEsmLoaderHookRegistered) {\n try {\n const { addHookMessagePort } = createAddHookMessageChannel();\n // @ts-expect-error register is available in these versions\n moduleModule.register('import-in-the-middle/hook.mjs', import.meta.url, {\n data: { addHookMessagePort, include: [] },\n transferList: [addHookMessagePort],\n });\n } catch (error) {\n logger.warn('Failed to register ESM hook', error);\n }\n }\n } else {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] You are using Node.js in ESM mode (\"import syntax\"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS (\"require() syntax\"), or upgrade your Node.js version.',\n );\n });\n }\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 logger.enable();\n setupOpenTelemetryLogger();\n }\n\n if (!isCjs()) {\n maybeInitializeEsmLoader();\n }\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 logger.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 return instruments.filter(instrumentation => integrationNames.includes(instrumentation.id));\n}\n\n/** Just exported for tests. */\nexport function setupOtel(client: NodeClient, options: AdditionalOpenTelemetryOptions = {}): BasicTracerProvider {\n // Create and configure NodeTracerProvider\n const provider = new BasicTracerProvider({\n sampler: new SentrySampler(client),\n resource: new Resource({\n [ATTR_SERVICE_NAME]: 'node',\n // eslint-disable-next-line deprecation/deprecation\n [SEMRESATTRS_SERVICE_NAMESPACE]: 'sentry',\n [ATTR_SERVICE_VERSION]: SDK_VERSION,\n }),\n forceFlushTimeoutMillis: 500,\n spanProcessors: [\n new SentrySpanProcessor({\n timeout: _clampSpanProcessorTimeout(client.getOptions().maxSpanWaitDuration),\n }),\n ...(options.spanProcessors || []),\n ],\n });\n\n // Register as globals\n trace.setGlobalTracerProvider(provider);\n propagation.setGlobalPropagator(new SentryPropagator());\n context.setGlobalContextManager(new SentryContextManager());\n\n return provider;\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 logger.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 && logger.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.');\n return undefined;\n }\n\n return maxSpanWaitDuration;\n}\n\n/**\n * Setup the OTEL logger to use our own logger.\n */\nfunction setupOpenTelemetryLogger(): void {\n const otelLogger = new Proxy(logger as typeof logger & { verbose: (typeof logger)['debug'] }, {\n get(target, prop, receiver) {\n const actualProp = prop === 'verbose' ? 'debug' : prop;\n return Reflect.get(target, actualProp, receiver);\n },\n });\n\n // Disable diag, to ensure this works even if called multiple times\n diag.disable();\n diag.setLogger(otelLogger, DiagLogLevel.DEBUG);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmBA;AACA,MAAM,0BAAA,GAA6B,OAAS;;AAO5C;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,MAAM,EAAc,OAAO,GAAmC,EAAE,EAAQ;AAC1G,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE;AACjC,IAAI,wBAAwB,EAAE;AAC9B;;AAEA,EAAE,MAAM,WAAW,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7C,EAAE,MAAM,CAAC,aAAc,GAAE,QAAQ;AACjC;;AAEA;AACO,SAAS,wBAAwB,GAAS;AACjD,EAAE,MAAM,CAAC,SAAA,GAAY,CAAC,EAAE,SAAU,GAAE,CAAC,CAAA,GAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;;AAErF;AACA,EAAE,IA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BAA0B,CAAC,mBAAmB,EAA0C;AACxG,EAAE,IAAI,mBAAoB,IAAG,IAAI,EAAE;AACnC,IAAI,OAAO,SAAS;AACpB;;AAEA;AACA;AACA,EAAE,IAAI,mBAAoB,GAAE,0BAA0B,EAAE;AACxD,IAAI,WAAY;AAChB,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,gEAAgE,EAAE,0BAA0B,CAAC,CAAA,CAAA;AACA,IAAA,OAAA,0BAAA;AACA,GAAA,MAAA,IAAA,mBAAA,IAAA,CAAA,IAAA,MAAA,CAAA,KAAA,CAAA,mBAAA,CAAA,EAAA;AACA,IAAA,WAAA,IAAA,MAAA,CAAA,IAAA,CAAA,+EAAA,CAAA;AACA,IAAA,OAAA,SAAA;AACA;;AAEA,EAAA,OAAA,mBAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,wBAAA,GAAA;AACA,EAAA,MAAA,UAAA,GAAA,IAAA,KAAA,CAAA,MAAA,GAAA;AACA,IAAA,GAAA,CAAA,MAAA,EAAA,IAAA,EAAA,QAAA,EAAA;AACA,MAAA,MAAA,UAAA,GAAA,IAAA,KAAA,SAAA,GAAA,OAAA,GAAA,IAAA;AACA,MAAA,OAAA,OAAA,CAAA,GAAA,CAAA,MAAA,EAAA,UAAA,EAAA,QAAA,CAAA;AACA,KAAA;AACA,GAAA,CAAA;;AAEA;AACA,EAAA,IAAA,CAAA,OAAA,EAAA;AACA,EAAA,IAAA,CAAA,SAAA,CAAA,UAAA,EAAA,YAAA,CAAA,KAAA,CAAA;AACA;;;;"}
@@ -44,6 +44,6 @@ export { NodeClient } from './sdk/client';
44
44
  export { cron } from './cron';
45
45
  export type { NodeOptions } from './types';
46
46
  export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
47
- export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, 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, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, zodErrorsIntegration, profiler, _experiment_log, } from '@sentry/core';
47
+ export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, 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, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, zodErrorsIntegration, profiler, } from '@sentry/core';
48
48
  export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/core';
49
49
  //# 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,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpF,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,EA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EACxB,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,cAAc,EACd,oBAAoB,EACpB,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,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,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAQA,UAAU,cAAc;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAID,eAAO,MAAM,iBAAiB;;CAyC7B,CAAC;AAcF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,8EAAyC,CAAC"}
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAQA,UAAU,cAAc;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAID,eAAO,MAAM,iBAAiB;;CAsC7B,CAAC;AAcF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,8EAAyC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAapE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,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,CAOxG;AAED,iCAAiC;AACjC,wBAAgB,wBAAwB,IAAI,IAAI,CAyB/C;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,CAoB3E;AAYD,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,mBAAmB,CA0B/G;AAED,+BAA+B;AAC/B,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtG"}
1
+ {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAapE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,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,CAOxG;AAED,iCAAiC;AACjC,wBAAgB,wBAAwB,IAAI,IAAI,CAyB/C;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,CAoB3E;AAYD,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,mBAAmB,CAyB/G;AAED,+BAA+B;AAC/B,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtG"}
@@ -44,6 +44,6 @@ export { NodeClient } from './sdk/client';
44
44
  export { cron } from './cron';
45
45
  export { NodeOptions } from './types';
46
46
  export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
47
- export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, 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, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, zodErrorsIntegration, profiler, _experiment_log, } from '@sentry/core';
47
+ export { addBreadcrumb, isInitialized, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, 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, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, zodErrorsIntegration, profiler, } from '@sentry/core';
48
48
  export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/core';
49
49
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/node",
3
- "version": "9.6.0-alpha.0",
3
+ "version": "9.6.1",
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",
@@ -95,9 +95,9 @@
95
95
  "@opentelemetry/resources": "^1.30.1",
96
96
  "@opentelemetry/sdk-trace-base": "^1.30.1",
97
97
  "@opentelemetry/semantic-conventions": "^1.30.0",
98
- "@prisma/instrumentation": "6.4.1",
99
- "@sentry/core": "9.6.0-alpha.0",
100
- "@sentry/opentelemetry": "9.6.0-alpha.0",
98
+ "@prisma/instrumentation": "6.5.0",
99
+ "@sentry/core": "9.6.1",
100
+ "@sentry/opentelemetry": "9.6.1",
101
101
  "import-in-the-middle": "^1.13.0"
102
102
  },
103
103
  "devDependencies": {