@sentry/node
Advanced tools
Comparing version
@@ -28,2 +28,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
const index$4 = require('./integrations/tracing/vercelai/index.js'); | ||
const index$5 = require('./integrations/tracing/openai/index.js'); | ||
const launchDarkly = require('./integrations/featureFlagShims/launchDarkly.js'); | ||
@@ -33,5 +34,5 @@ const openFeature = require('./integrations/featureFlagShims/openFeature.js'); | ||
const unleash = require('./integrations/featureFlagShims/unleash.js'); | ||
const index$5 = require('./sdk/index.js'); | ||
const index$6 = require('./sdk/index.js'); | ||
const initOtel = require('./sdk/initOtel.js'); | ||
const index$6 = require('./integrations/tracing/index.js'); | ||
const index$7 = require('./integrations/tracing/index.js'); | ||
const opentelemetry = require('@sentry/opentelemetry'); | ||
@@ -74,2 +75,3 @@ const core = require('@sentry/core'); | ||
exports.vercelAIIntegration = index$4.vercelAIIntegration; | ||
exports.openAIIntegration = index$5.openAIIntegration; | ||
exports.buildLaunchDarklyFlagUsedHandler = launchDarkly.buildLaunchDarklyFlagUsedHandlerShim; | ||
@@ -81,9 +83,9 @@ exports.launchDarklyIntegration = launchDarkly.launchDarklyIntegrationShim; | ||
exports.unleashIntegration = unleash.unleashIntegrationShim; | ||
exports.getDefaultIntegrations = index$5.getDefaultIntegrations; | ||
exports.getDefaultIntegrationsWithoutPerformance = index$5.getDefaultIntegrationsWithoutPerformance; | ||
exports.init = index$5.init; | ||
exports.initWithoutDefaultIntegrations = index$5.initWithoutDefaultIntegrations; | ||
exports.getDefaultIntegrations = index$6.getDefaultIntegrations; | ||
exports.getDefaultIntegrationsWithoutPerformance = index$6.getDefaultIntegrationsWithoutPerformance; | ||
exports.init = index$6.init; | ||
exports.initWithoutDefaultIntegrations = index$6.initWithoutDefaultIntegrations; | ||
exports.initOpenTelemetry = initOtel.initOpenTelemetry; | ||
exports.preloadOpenTelemetry = initOtel.preloadOpenTelemetry; | ||
exports.getAutoPerformanceIntegrations = index$6.getAutoPerformanceIntegrations; | ||
exports.getAutoPerformanceIntegrations = index$7.getAutoPerformanceIntegrations; | ||
exports.setNodeAsyncContextStrategy = opentelemetry.setOpenTelemetryContextAsyncContextStrategy; | ||
@@ -90,0 +92,0 @@ exports.SDK_VERSION = core.SDK_VERSION; |
@@ -126,3 +126,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
} | ||
} catch (e) { | ||
} catch { | ||
/* catch block */ | ||
@@ -129,0 +129,0 @@ } |
@@ -32,3 +32,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
if (core.getIsolationScope() === core.getDefaultIsolationScope()) { | ||
debugBuild.DEBUG_BUILD && core.logger.warn('Isolation scope is still default isolation scope - skipping setting transactionName'); | ||
debugBuild.DEBUG_BUILD && core.debug.warn('Isolation scope is still default isolation scope - skipping setting transactionName'); | ||
return defaultName; | ||
@@ -35,0 +35,0 @@ } |
@@ -30,3 +30,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
debugBuild.DEBUG_BUILD && | ||
core.logger.warn( | ||
core.debug.warn( | ||
'Fastify error handler was already registered via diagnostics channel.', | ||
@@ -57,3 +57,3 @@ 'You can safely remove `setupFastifyErrorHandler` call.', | ||
if (err) { | ||
debugBuild.DEBUG_BUILD && core.logger.error('Failed to setup Fastify instrumentation', err); | ||
debugBuild.DEBUG_BUILD && core.debug.error('Failed to setup Fastify instrumentation', err); | ||
} else { | ||
@@ -60,0 +60,0 @@ instrumentClient(); |
@@ -70,3 +70,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
debugBuild.DEBUG_BUILD && | ||
core.logger.warn('Isolation scope is still the default isolation scope - skipping setting transactionName'); | ||
core.debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName'); | ||
} | ||
@@ -73,0 +73,0 @@ |
@@ -18,2 +18,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
const mysql2 = require('./mysql2.js'); | ||
const index$4 = require('./openai/index.js'); | ||
const postgres = require('./postgres.js'); | ||
@@ -50,2 +51,3 @@ const postgresjs = require('./postgresjs.js'); | ||
index$3.vercelAIIntegration(), | ||
index$4.openAIIntegration(), | ||
postgresjs.postgresJsIntegration(), | ||
@@ -83,2 +85,3 @@ ]; | ||
index$3.instrumentVercelAi, | ||
index$4.instrumentOpenAi, | ||
postgresjs.instrumentPostgresJs, | ||
@@ -85,0 +88,0 @@ ]; |
@@ -37,3 +37,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
if (core.getIsolationScope() === core.getDefaultIsolationScope()) { | ||
debugBuild.DEBUG_BUILD && core.logger.warn('Isolation scope is default isolation scope - skipping setting transactionName'); | ||
debugBuild.DEBUG_BUILD && core.debug.warn('Isolation scope is default isolation scope - skipping setting transactionName'); | ||
return; | ||
@@ -40,0 +40,0 @@ } |
@@ -165,3 +165,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
if (error) { | ||
core.logger.error(`Error in requestHook for ${INTEGRATION_NAME} integration:`, error); | ||
core.debug.error(`Error in requestHook for ${INTEGRATION_NAME} integration:`, error); | ||
} | ||
@@ -168,0 +168,0 @@ }, |
@@ -46,3 +46,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
} catch (error) { | ||
core.logger.warn('Failed to register ESM hook', error); | ||
core.debug.warn('Failed to register ESM hook', error); | ||
} | ||
@@ -69,3 +69,3 @@ } | ||
if (debug) { | ||
core.logger.enable(); | ||
core.debug.enable(); | ||
} | ||
@@ -82,3 +82,3 @@ | ||
if (debug) { | ||
core.logger.log(`[Sentry] Preloaded ${fn.id} instrumentation`); | ||
core.debug.log(`[Sentry] Preloaded ${fn.id} instrumentation`); | ||
} | ||
@@ -136,6 +136,6 @@ }); | ||
debugBuild.DEBUG_BUILD && | ||
core.logger.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`); | ||
core.debug.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`); | ||
return MAX_MAX_SPAN_WAIT_DURATION; | ||
} else if (maxSpanWaitDuration <= 0 || Number.isNaN(maxSpanWaitDuration)) { | ||
debugBuild.DEBUG_BUILD && core.logger.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.'); | ||
debugBuild.DEBUG_BUILD && core.debug.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.'); | ||
return undefined; | ||
@@ -142,0 +142,0 @@ } |
@@ -56,3 +56,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
return flatten(cmdArgs.map(arg => processArg(arg))); | ||
} catch (e) { | ||
} catch { | ||
return undefined; | ||
@@ -86,3 +86,3 @@ } | ||
return JSON.stringify(value).length; | ||
} catch (e) { | ||
} catch { | ||
return undefined; | ||
@@ -89,0 +89,0 @@ } |
@@ -26,2 +26,3 @@ export { httpIntegration } from './integrations/http/index.js'; | ||
export { vercelAIIntegration } from './integrations/tracing/vercelai/index.js'; | ||
export { openAIIntegration } from './integrations/tracing/openai/index.js'; | ||
export { buildLaunchDarklyFlagUsedHandlerShim as buildLaunchDarklyFlagUsedHandler, launchDarklyIntegrationShim as launchDarklyIntegration } from './integrations/featureFlagShims/launchDarkly.js'; | ||
@@ -28,0 +29,0 @@ export { OpenFeatureIntegrationHookShim as OpenFeatureIntegrationHook, openFeatureIntegrationShim as openFeatureIntegration } from './integrations/featureFlagShims/openFeature.js'; |
@@ -124,3 +124,3 @@ import { AttributeNames } from './enums/AttributeNames.js'; | ||
} | ||
} catch (e) { | ||
} catch { | ||
/* catch block */ | ||
@@ -127,0 +127,0 @@ } |
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express'; | ||
import { defineIntegration, getIsolationScope, getDefaultIsolationScope, logger, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, httpRequestToRequestData, captureException } from '@sentry/core'; | ||
import { defineIntegration, getIsolationScope, getDefaultIsolationScope, debug, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, httpRequestToRequestData, captureException } from '@sentry/core'; | ||
import { generateInstrumentOnce, addOriginToSpan, ensureIsWrapped } from '@sentry/node-core'; | ||
@@ -30,3 +30,3 @@ import { DEBUG_BUILD } from '../../debug-build.js'; | ||
if (getIsolationScope() === getDefaultIsolationScope()) { | ||
DEBUG_BUILD && logger.warn('Isolation scope is still default isolation scope - skipping setting transactionName'); | ||
DEBUG_BUILD && debug.warn('Isolation scope is still default isolation scope - skipping setting transactionName'); | ||
return defaultName; | ||
@@ -33,0 +33,0 @@ } |
import * as dc from 'node:diagnostics_channel'; | ||
import { logger, defineIntegration, getClient, getIsolationScope, captureException, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; | ||
import { debug, defineIntegration, getClient, getIsolationScope, captureException, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; | ||
import { generateInstrumentOnce } from '@sentry/node-core'; | ||
@@ -28,3 +28,3 @@ import { DEBUG_BUILD } from '../../../debug-build.js'; | ||
DEBUG_BUILD && | ||
logger.warn( | ||
debug.warn( | ||
'Fastify error handler was already registered via diagnostics channel.', | ||
@@ -55,3 +55,3 @@ 'You can safely remove `setupFastifyErrorHandler` call.', | ||
if (err) { | ||
DEBUG_BUILD && logger.error('Failed to setup Fastify instrumentation', err); | ||
DEBUG_BUILD && debug.error('Failed to setup Fastify instrumentation', err); | ||
} else { | ||
@@ -58,0 +58,0 @@ instrumentClient(); |
import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi'; | ||
import { defineIntegration, SDK_VERSION, getClient, getIsolationScope, getDefaultIsolationScope, logger, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, captureException } from '@sentry/core'; | ||
import { defineIntegration, SDK_VERSION, getClient, getIsolationScope, getDefaultIsolationScope, debug, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, captureException } from '@sentry/core'; | ||
import { generateInstrumentOnce, ensureIsWrapped } from '@sentry/node-core'; | ||
@@ -68,3 +68,3 @@ import { DEBUG_BUILD } from '../../../debug-build.js'; | ||
DEBUG_BUILD && | ||
logger.warn('Isolation scope is still the default isolation scope - skipping setting transactionName'); | ||
debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName'); | ||
} | ||
@@ -71,0 +71,0 @@ |
@@ -16,2 +16,3 @@ import { instrumentOtelHttp } from '../http/index.js'; | ||
import { instrumentMysql2, mysql2Integration } from './mysql2.js'; | ||
import { instrumentOpenAi, openAIIntegration } from './openai/index.js'; | ||
import { instrumentPostgres, postgresIntegration } from './postgres.js'; | ||
@@ -48,2 +49,3 @@ import { instrumentPostgresJs, postgresJsIntegration } from './postgresjs.js'; | ||
vercelAIIntegration(), | ||
openAIIntegration(), | ||
postgresJsIntegration(), | ||
@@ -81,2 +83,3 @@ ]; | ||
instrumentVercelAi, | ||
instrumentOpenAi, | ||
instrumentPostgresJs, | ||
@@ -83,0 +86,0 @@ ]; |
import { KoaInstrumentation } from '@opentelemetry/instrumentation-koa'; | ||
import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; | ||
import { spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, getIsolationScope, getDefaultIsolationScope, logger, defineIntegration, captureException } from '@sentry/core'; | ||
import { spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, getIsolationScope, getDefaultIsolationScope, debug, defineIntegration, captureException } from '@sentry/core'; | ||
import { generateInstrumentOnce, addOriginToSpan, ensureIsWrapped } from '@sentry/node-core'; | ||
@@ -35,3 +35,3 @@ import { DEBUG_BUILD } from '../../debug-build.js'; | ||
if (getIsolationScope() === getDefaultIsolationScope()) { | ||
DEBUG_BUILD && logger.warn('Isolation scope is default isolation scope - skipping setting transactionName'); | ||
DEBUG_BUILD && debug.warn('Isolation scope is default isolation scope - skipping setting transactionName'); | ||
return; | ||
@@ -38,0 +38,0 @@ } |
import { trace, context } from '@opentelemetry/api'; | ||
import { InstrumentationBase, InstrumentationNodeModuleDefinition, InstrumentationNodeModuleFile, safeExecuteInTheMiddle } from '@opentelemetry/instrumentation'; | ||
import { ATTR_DB_RESPONSE_STATUS_CODE, ATTR_ERROR_TYPE, ATTR_DB_OPERATION_NAME, ATTR_DB_SYSTEM_NAME, ATTR_DB_NAMESPACE, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_DB_QUERY_TEXT } from '@opentelemetry/semantic-conventions'; | ||
import { SDK_VERSION, SPAN_STATUS_ERROR, startSpanManual, getCurrentScope, logger, defineIntegration } from '@sentry/core'; | ||
import { SDK_VERSION, SPAN_STATUS_ERROR, startSpanManual, getCurrentScope, debug, defineIntegration } from '@sentry/core'; | ||
import { generateInstrumentOnce, addOriginToSpan } from '@sentry/node-core'; | ||
@@ -163,3 +163,3 @@ | ||
if (error) { | ||
logger.error(`Error in requestHook for ${INTEGRATION_NAME} integration:`, error); | ||
debug.error(`Error in requestHook for ${INTEGRATION_NAME} integration:`, error); | ||
} | ||
@@ -166,0 +166,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
{"type":"module","version":"9.39.0","sideEffects":false} | ||
{"type":"module","version":"9.40.0","sideEffects":false} |
@@ -5,3 +5,3 @@ import { trace, propagation, context } from '@opentelemetry/api'; | ||
import { ATTR_SERVICE_VERSION, SEMRESATTRS_SERVICE_NAMESPACE, ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; | ||
import { SDK_VERSION, logger, GLOBAL_OBJ, consoleSandbox } from '@sentry/core'; | ||
import { SDK_VERSION, debug, GLOBAL_OBJ, consoleSandbox } from '@sentry/core'; | ||
import { setupOpenTelemetryLogger, SentryContextManager, isCjs } from '@sentry/node-core'; | ||
@@ -44,3 +44,3 @@ import { SentrySpanProcessor, SentrySampler, SentryPropagator } from '@sentry/opentelemetry'; | ||
} catch (error) { | ||
logger.warn('Failed to register ESM hook', error); | ||
debug.warn('Failed to register ESM hook', error); | ||
} | ||
@@ -64,6 +64,6 @@ } | ||
function preloadOpenTelemetry(options = {}) { | ||
const { debug } = options; | ||
const { debug: debug$1 } = options; | ||
if (debug) { | ||
logger.enable(); | ||
if (debug$1) { | ||
debug.enable(); | ||
} | ||
@@ -79,4 +79,4 @@ | ||
if (debug) { | ||
logger.log(`[Sentry] Preloaded ${fn.id} instrumentation`); | ||
if (debug$1) { | ||
debug.log(`[Sentry] Preloaded ${fn.id} instrumentation`); | ||
} | ||
@@ -134,6 +134,6 @@ }); | ||
DEBUG_BUILD && | ||
logger.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`); | ||
debug.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`); | ||
return MAX_MAX_SPAN_WAIT_DURATION; | ||
} else if (maxSpanWaitDuration <= 0 || Number.isNaN(maxSpanWaitDuration)) { | ||
DEBUG_BUILD && logger.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.'); | ||
DEBUG_BUILD && debug.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.'); | ||
return undefined; | ||
@@ -140,0 +140,0 @@ } |
@@ -54,3 +54,3 @@ const SINGLE_ARG_COMMANDS = ['get', 'set', 'setex']; | ||
return flatten(cmdArgs.map(arg => processArg(arg))); | ||
} catch (e) { | ||
} catch { | ||
return undefined; | ||
@@ -84,3 +84,3 @@ } | ||
return JSON.stringify(value).length; | ||
} catch (e) { | ||
} catch { | ||
return undefined; | ||
@@ -87,0 +87,0 @@ } |
@@ -26,2 +26,3 @@ export { httpIntegration } from './integrations/http'; | ||
export { vercelAIIntegration } from './integrations/tracing/vercelai'; | ||
export { openAIIntegration } from './integrations/tracing/openai'; | ||
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, } from './integrations/featureFlagShims'; | ||
@@ -28,0 +29,0 @@ export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk'; |
@@ -26,2 +26,3 @@ export { httpIntegration } from './integrations/http'; | ||
export { vercelAIIntegration } from './integrations/tracing/vercelai'; | ||
export { openAIIntegration } from './integrations/tracing/openai'; | ||
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, } from './integrations/featureFlagShims'; | ||
@@ -28,0 +29,0 @@ export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk'; |
{ | ||
"name": "@sentry/node", | ||
"version": "9.39.0", | ||
"version": "9.40.0", | ||
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation", | ||
@@ -98,5 +98,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"@prisma/instrumentation": "6.11.1", | ||
"@sentry/core": "9.39.0", | ||
"@sentry/node-core": "9.39.0", | ||
"@sentry/opentelemetry": "9.39.0", | ||
"@sentry/core": "9.40.0", | ||
"@sentry/node-core": "9.40.0", | ||
"@sentry/opentelemetry": "9.40.0", | ||
"import-in-the-middle": "^1.14.2", | ||
@@ -103,0 +103,0 @@ "minimatch": "^9.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1167185
2.97%393
3.69%13018
3.56%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated
Updated