@sentry/node 10.61.0 → 10.63.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/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/cjs/integrations/fs/index.js.map +1 -1
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch/index.js +7 -49
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/node-fetch/undici-instrumentation.js +266 -0
- package/build/cjs/integrations/node-fetch/undici-instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/index.js +2 -10
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +21 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +0 -6
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +71 -80
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -1
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +7 -103
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +2 -3
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js +1 -24
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +33 -72
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +46 -105
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +0 -1
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -1
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +4 -2
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/index.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +34 -128
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +0 -2
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +2 -27
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -1
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/index.js +1 -10
- package/build/cjs/integrations/tracing/prisma/index.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/global.js +2 -2
- package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/index.js +5 -3
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +4 -3
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -1
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +8 -6
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/esm/integrations/fs/index.js.map +1 -1
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch/index.js +9 -50
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/node-fetch/undici-instrumentation.js +264 -0
- package/build/esm/integrations/node-fetch/undici-instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/index.js +3 -11
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +12 -2
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +1 -6
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +68 -78
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader/index.js.map +1 -1
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +8 -103
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +3 -4
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/firebase.js +3 -26
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +34 -73
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +47 -106
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/hono/index.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +1 -2
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -1
- package/build/esm/integrations/tracing/knex/index.js.map +1 -1
- package/build/esm/integrations/tracing/koa/index.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +5 -3
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/index.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +37 -131
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +1 -2
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +3 -25
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -1
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/index.js +2 -11
- package/build/esm/integrations/tracing/prisma/index.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/global.js +2 -2
- package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/index.js +7 -5
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +5 -4
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -1
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +9 -7
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
- package/build/types/integrations/fs/index.d.ts +3 -1
- package/build/types/integrations/fs/index.d.ts.map +1 -1
- package/build/types/integrations/http.d.ts +3 -1
- package/build/types/integrations/http.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/index.d.ts +4 -35
- package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/types.d.ts +96 -0
- package/build/types/integrations/node-fetch/types.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/undici-instrumentation.d.ts +14 -0
- package/build/types/integrations/node-fetch/undici-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/index.d.ts +4 -2
- package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts +3 -1
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect/index.d.ts +3 -1
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/dataloader/index.d.ts +3 -1
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/express.d.ts +3 -1
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
- package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/genericPool/index.d.ts +3 -1
- package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/google-genai/index.d.ts +3 -1
- package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/index.d.ts +3 -1
- package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts +3 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hono/index.d.ts +3 -1
- package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/index.d.ts +3 -1
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/knex/index.d.ts +3 -1
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/index.d.ts +3 -1
- package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langchain/index.d.ts +3 -1
- package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langgraph/index.d.ts +3 -1
- package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts +3 -1
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/index.d.ts +3 -1
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/index.d.ts +3 -1
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/index.d.ts +3 -1
- package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +0 -8
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2/index.d.ts +3 -1
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/openai/index.d.ts +3 -1
- package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/index.d.ts +3 -1
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
- package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/index.d.ts +5 -21
- package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts +5 -23
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/index.d.ts +4 -2
- package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious/index.d.ts +3 -1
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
- package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
- package/build/types/sdk/diagnosticsChannelInjection.d.ts +1 -1
- package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -1
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -1
- package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
- package/build/types-ts3.8/integrations/fs/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/http.d.ts +3 -1
- package/build/types-ts3.8/integrations/node-fetch/index.d.ts +4 -35
- package/build/types-ts3.8/integrations/node-fetch/types.d.ts +96 -0
- package/build/types-ts3.8/integrations/node-fetch/undici-instrumentation.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +4 -2
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/connect/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/dataloader/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
- package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types-ts3.8/integrations/tracing/genericPool/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/graphql/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/kafka/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/knex/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/koa/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/mongoose/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/mysql/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
- package/build/types-ts3.8/integrations/tracing/mysql2/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/postgres/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/prisma/index.d.ts +5 -21
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +5 -23
- package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +4 -2
- package/build/types-ts3.8/integrations/tracing/tedious/index.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
- package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +1 -1
- package/package.json +6 -5
- package/build/cjs/integrations/node-fetch/vendored/semconv.js +0 -28
- package/build/cjs/integrations/node-fetch/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/node-fetch/vendored/undici.js +0 -302
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +0 -452
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -24
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +0 -387
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +0 -9
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
- package/build/esm/integrations/node-fetch/vendored/semconv.js +0 -15
- package/build/esm/integrations/node-fetch/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/node-fetch/vendored/undici.js +0 -300
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +0 -450
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -13
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +0 -385
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +0 -7
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
- package/build/types/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
- package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/node-fetch/vendored/semconv.d.ts +0 -13
- package/build/types/integrations/node-fetch/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/node-fetch/vendored/types.d.ts +0 -60
- package/build/types/integrations/node-fetch/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/node-fetch/vendored/undici.d.ts +0 -21
- package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts +0 -9
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
- package/build/types-ts3.8/integrations/node-fetch/vendored/semconv.d.ts +0 -13
- package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +0 -60
- package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +0 -21
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
- package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +0 -9
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
import * as dc from 'node:diagnostics_channel';
|
|
2
|
-
import { diag, propagation, context, trace, SpanStatusCode } from '@opentelemetry/api';
|
|
3
|
-
import { ATTR_HTTP_ROUTE, ATTR_URL_PATH, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE } from '@opentelemetry/semantic-conventions';
|
|
4
|
-
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
5
|
-
import { SDK_VERSION } from '@sentry/core';
|
|
6
|
-
import { setHttpServerSpanRouteAttribute } from '../../../../utils/setHttpServerSpanRouteAttribute.js';
|
|
7
|
-
|
|
8
|
-
var _a, _b;
|
|
9
|
-
const PACKAGE_VERSION = SDK_VERSION;
|
|
10
|
-
const PACKAGE_NAME = "@sentry/instrumentation-fastify";
|
|
11
|
-
const SUPPORTED_VERSIONS = ">=4.0.0 <6";
|
|
12
|
-
const FASTIFY_HOOKS = [
|
|
13
|
-
"onRequest",
|
|
14
|
-
"preParsing",
|
|
15
|
-
"preValidation",
|
|
16
|
-
"preHandler",
|
|
17
|
-
"preSerialization",
|
|
18
|
-
"onSend",
|
|
19
|
-
"onResponse",
|
|
20
|
-
"onError"
|
|
21
|
-
];
|
|
22
|
-
const ATTRIBUTE_NAMES = {
|
|
23
|
-
HOOK_NAME: "hook.name",
|
|
24
|
-
FASTIFY_TYPE: "fastify.type",
|
|
25
|
-
HOOK_CALLBACK_NAME: "hook.callback.name",
|
|
26
|
-
ROOT: "fastify.root"
|
|
27
|
-
};
|
|
28
|
-
const HOOK_TYPES = {
|
|
29
|
-
ROUTE: "route-hook",
|
|
30
|
-
INSTANCE: "hook",
|
|
31
|
-
HANDLER: "request-handler"
|
|
32
|
-
};
|
|
33
|
-
const ANONYMOUS_FUNCTION_NAME = "anonymous";
|
|
34
|
-
const kInstrumentation = /* @__PURE__ */ Symbol("fastify otel instance");
|
|
35
|
-
const kRequestSpan = /* @__PURE__ */ Symbol("fastify otel request spans");
|
|
36
|
-
const kRequestContext = /* @__PURE__ */ Symbol("fastify otel request context");
|
|
37
|
-
const kAddHookOriginal = /* @__PURE__ */ Symbol("fastify otel addhook original");
|
|
38
|
-
const kSetNotFoundOriginal = /* @__PURE__ */ Symbol("fastify otel setnotfound original");
|
|
39
|
-
const kRecordExceptions = /* @__PURE__ */ Symbol("fastify otel record exceptions");
|
|
40
|
-
class FastifyOtelInstrumentation extends (_b = InstrumentationBase, _a = kRecordExceptions, _b) {
|
|
41
|
-
constructor(config = {}) {
|
|
42
|
-
super(PACKAGE_NAME, PACKAGE_VERSION, config);
|
|
43
|
-
this._otelLogger = null;
|
|
44
|
-
this._requestHook = null;
|
|
45
|
-
this._lifecycleHook = null;
|
|
46
|
-
this._handleInitialization = void 0;
|
|
47
|
-
this[_a] = true;
|
|
48
|
-
this._otelLogger = diag.createComponentLogger({ namespace: PACKAGE_NAME });
|
|
49
|
-
this[kRecordExceptions] = true;
|
|
50
|
-
if (config?.recordExceptions != null) {
|
|
51
|
-
if (typeof config.recordExceptions !== "boolean") {
|
|
52
|
-
throw new TypeError("recordExceptions must be a boolean");
|
|
53
|
-
}
|
|
54
|
-
this[kRecordExceptions] = config.recordExceptions;
|
|
55
|
-
}
|
|
56
|
-
if (typeof config?.requestHook === "function") {
|
|
57
|
-
this._requestHook = config.requestHook;
|
|
58
|
-
}
|
|
59
|
-
if (typeof config?.lifecycleHook === "function") {
|
|
60
|
-
this._lifecycleHook = config.lifecycleHook;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
enable() {
|
|
64
|
-
if (this._handleInitialization === void 0 && this.getConfig().registerOnInitialization) {
|
|
65
|
-
this._handleInitialization = (message) => {
|
|
66
|
-
this.plugin()(message.fastify, void 0, () => {
|
|
67
|
-
});
|
|
68
|
-
const emptyPlugin = (_, __, done) => {
|
|
69
|
-
done();
|
|
70
|
-
};
|
|
71
|
-
emptyPlugin[/* @__PURE__ */ Symbol.for("skip-override")] = true;
|
|
72
|
-
emptyPlugin[/* @__PURE__ */ Symbol.for("fastify.display-name")] = PACKAGE_NAME;
|
|
73
|
-
message.fastify.register(emptyPlugin);
|
|
74
|
-
};
|
|
75
|
-
dc.subscribe("fastify.initialization", this._handleInitialization);
|
|
76
|
-
}
|
|
77
|
-
return super.enable();
|
|
78
|
-
}
|
|
79
|
-
disable() {
|
|
80
|
-
if (this._handleInitialization) {
|
|
81
|
-
dc.unsubscribe("fastify.initialization", this._handleInitialization);
|
|
82
|
-
this._handleInitialization = void 0;
|
|
83
|
-
}
|
|
84
|
-
return super.disable();
|
|
85
|
-
}
|
|
86
|
-
init() {
|
|
87
|
-
return [];
|
|
88
|
-
}
|
|
89
|
-
plugin() {
|
|
90
|
-
const instrumentation = this;
|
|
91
|
-
const pluginAny = FastifyInstrumentationPlugin;
|
|
92
|
-
pluginAny[/* @__PURE__ */ Symbol.for("skip-override")] = true;
|
|
93
|
-
pluginAny[/* @__PURE__ */ Symbol.for("fastify.display-name")] = PACKAGE_NAME;
|
|
94
|
-
pluginAny[/* @__PURE__ */ Symbol.for("plugin-meta")] = {
|
|
95
|
-
fastify: SUPPORTED_VERSIONS,
|
|
96
|
-
name: PACKAGE_NAME
|
|
97
|
-
};
|
|
98
|
-
return FastifyInstrumentationPlugin;
|
|
99
|
-
function FastifyInstrumentationPlugin(instance, _opts, done) {
|
|
100
|
-
instance.decorate(kInstrumentation, instrumentation);
|
|
101
|
-
instance.decorate(kAddHookOriginal, instance.addHook);
|
|
102
|
-
instance.decorate(kSetNotFoundOriginal, instance.setNotFoundHandler);
|
|
103
|
-
instance.decorateRequest("opentelemetry", function opentelemetry() {
|
|
104
|
-
const ctx = this[kRequestContext];
|
|
105
|
-
const span = this[kRequestSpan];
|
|
106
|
-
return {
|
|
107
|
-
enabled: this.routeOptions.config?.otel !== false,
|
|
108
|
-
span,
|
|
109
|
-
tracer: instrumentation.tracer,
|
|
110
|
-
context: ctx,
|
|
111
|
-
inject: (carrier, setter) => {
|
|
112
|
-
return propagation.inject(ctx, carrier, setter);
|
|
113
|
-
},
|
|
114
|
-
extract: (carrier, getter) => {
|
|
115
|
-
return propagation.extract(ctx, carrier, getter);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
});
|
|
119
|
-
instance.decorateRequest(kRequestSpan, null);
|
|
120
|
-
instance.decorateRequest(kRequestContext, null);
|
|
121
|
-
instance.addHook("onRoute", function otelWireRoute(routeOptions) {
|
|
122
|
-
if (routeOptions.config?.otel === false) {
|
|
123
|
-
instrumentation._otelLogger.debug(
|
|
124
|
-
`Ignoring route instrumentation ${routeOptions.method} ${routeOptions.url} because it is disabled`
|
|
125
|
-
);
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
for (const hook of FASTIFY_HOOKS) {
|
|
129
|
-
if (routeOptions[hook] != null) {
|
|
130
|
-
const handlerLike = routeOptions[hook];
|
|
131
|
-
if (typeof handlerLike === "function") {
|
|
132
|
-
routeOptions[hook] = handlerWrapper(handlerLike, hook, {
|
|
133
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,
|
|
134
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,
|
|
135
|
-
[ATTR_HTTP_ROUTE]: routeOptions.url,
|
|
136
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handlerLike.name?.length > 0 ? handlerLike.name : ANONYMOUS_FUNCTION_NAME
|
|
137
|
-
});
|
|
138
|
-
} else if (Array.isArray(handlerLike)) {
|
|
139
|
-
const wrappedHandlers = [];
|
|
140
|
-
for (const handler of handlerLike) {
|
|
141
|
-
wrappedHandlers.push(
|
|
142
|
-
handlerWrapper(handler, hook, {
|
|
143
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,
|
|
144
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,
|
|
145
|
-
[ATTR_HTTP_ROUTE]: routeOptions.url,
|
|
146
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME
|
|
147
|
-
})
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
routeOptions[hook] = wrappedHandlers;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (routeOptions.onSend != null) {
|
|
155
|
-
routeOptions.onSend = Array.isArray(routeOptions.onSend) ? [...routeOptions.onSend, finalizeResponseSpanHook] : [routeOptions.onSend, finalizeResponseSpanHook];
|
|
156
|
-
} else {
|
|
157
|
-
routeOptions.onSend = finalizeResponseSpanHook;
|
|
158
|
-
}
|
|
159
|
-
if (routeOptions.onError != null) {
|
|
160
|
-
routeOptions.onError = Array.isArray(routeOptions.onError) ? [...routeOptions.onError, recordErrorInSpanHook] : [routeOptions.onError, recordErrorInSpanHook];
|
|
161
|
-
} else {
|
|
162
|
-
routeOptions.onError = recordErrorInSpanHook;
|
|
163
|
-
}
|
|
164
|
-
routeOptions.handler = handlerWrapper(routeOptions.handler, "handler", {
|
|
165
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route-handler`,
|
|
166
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.HANDLER,
|
|
167
|
-
[ATTR_HTTP_ROUTE]: routeOptions.url,
|
|
168
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: routeOptions.handler.name.length > 0 ? routeOptions.handler.name : ANONYMOUS_FUNCTION_NAME
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
instance.addHook(
|
|
172
|
-
"onRequest",
|
|
173
|
-
function startRequestSpanHook(request, _reply, hookDone) {
|
|
174
|
-
if (this[kInstrumentation].isEnabled() === false || request.routeOptions.config?.otel === false) {
|
|
175
|
-
return hookDone();
|
|
176
|
-
}
|
|
177
|
-
let ctx = context.active();
|
|
178
|
-
if (trace.getSpan(ctx) == null) {
|
|
179
|
-
ctx = propagation.extract(ctx, request.headers);
|
|
180
|
-
}
|
|
181
|
-
if (request.routeOptions.url != null) {
|
|
182
|
-
setHttpServerSpanRouteAttribute(request.routeOptions.url);
|
|
183
|
-
}
|
|
184
|
-
const attributes = {
|
|
185
|
-
[ATTRIBUTE_NAMES.ROOT]: PACKAGE_NAME,
|
|
186
|
-
[ATTR_HTTP_REQUEST_METHOD]: request.method,
|
|
187
|
-
[ATTR_URL_PATH]: request.url
|
|
188
|
-
};
|
|
189
|
-
if (request.routeOptions.url != null) {
|
|
190
|
-
attributes[ATTR_HTTP_ROUTE] = request.routeOptions.url;
|
|
191
|
-
}
|
|
192
|
-
const span = this[kInstrumentation].tracer.startSpan("request", { attributes }, ctx);
|
|
193
|
-
try {
|
|
194
|
-
this[kInstrumentation]._requestHook?.(span, request);
|
|
195
|
-
} catch (err) {
|
|
196
|
-
this[kInstrumentation]._otelLogger.error({ err }, "requestHook threw");
|
|
197
|
-
}
|
|
198
|
-
request[kRequestContext] = trace.setSpan(ctx, span);
|
|
199
|
-
request[kRequestSpan] = span;
|
|
200
|
-
context.with(request[kRequestContext], () => {
|
|
201
|
-
hookDone();
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
instance.addHook("onResponse", function finalizeNotFoundSpanHook(request, reply, hookDone) {
|
|
206
|
-
const span = request[kRequestSpan];
|
|
207
|
-
if (span != null) {
|
|
208
|
-
span.setAttributes({
|
|
209
|
-
[ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode
|
|
210
|
-
});
|
|
211
|
-
span.end();
|
|
212
|
-
}
|
|
213
|
-
request[kRequestSpan] = null;
|
|
214
|
-
hookDone();
|
|
215
|
-
});
|
|
216
|
-
instance.addHook = addHookPatched;
|
|
217
|
-
instance.setNotFoundHandler = setNotFoundHandlerPatched;
|
|
218
|
-
done();
|
|
219
|
-
function finalizeResponseSpanHook(request, reply, payload, hookDone) {
|
|
220
|
-
const span = request[kRequestSpan];
|
|
221
|
-
if (span != null) {
|
|
222
|
-
if (reply.statusCode >= 500) {
|
|
223
|
-
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
224
|
-
}
|
|
225
|
-
span.setAttributes({
|
|
226
|
-
[ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode
|
|
227
|
-
});
|
|
228
|
-
span.end();
|
|
229
|
-
}
|
|
230
|
-
request[kRequestSpan] = null;
|
|
231
|
-
hookDone(null, payload);
|
|
232
|
-
}
|
|
233
|
-
function recordErrorInSpanHook(request, _reply, error, hookDone) {
|
|
234
|
-
const span = request[kRequestSpan];
|
|
235
|
-
if (span != null) {
|
|
236
|
-
span.setStatus({
|
|
237
|
-
code: SpanStatusCode.ERROR,
|
|
238
|
-
message: error.message
|
|
239
|
-
});
|
|
240
|
-
if (instrumentation[kRecordExceptions] !== false) {
|
|
241
|
-
span.recordException(error);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
hookDone();
|
|
245
|
-
}
|
|
246
|
-
function addHookPatched(name, hook) {
|
|
247
|
-
const addHookOriginal = this[kAddHookOriginal];
|
|
248
|
-
if (FASTIFY_HOOKS.includes(name)) {
|
|
249
|
-
return addHookOriginal.call(
|
|
250
|
-
this,
|
|
251
|
-
name,
|
|
252
|
-
handlerWrapper(hook, name, {
|
|
253
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - ${name}`,
|
|
254
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
|
|
255
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hook.name?.length > 0 ? hook.name : ANONYMOUS_FUNCTION_NAME
|
|
256
|
-
})
|
|
257
|
-
);
|
|
258
|
-
} else {
|
|
259
|
-
return addHookOriginal.call(this, name, hook);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
function setNotFoundHandlerPatched(hooks, handler) {
|
|
263
|
-
const setNotFoundHandlerOriginal = this[kSetNotFoundOriginal];
|
|
264
|
-
if (typeof hooks === "function") {
|
|
265
|
-
handler = handlerWrapper(hooks, "notFoundHandler", {
|
|
266
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,
|
|
267
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
|
|
268
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.name?.length > 0 ? hooks.name : ANONYMOUS_FUNCTION_NAME
|
|
269
|
-
});
|
|
270
|
-
setNotFoundHandlerOriginal.call(this, handler);
|
|
271
|
-
} else {
|
|
272
|
-
if (hooks.preValidation != null) {
|
|
273
|
-
hooks.preValidation = handlerWrapper(hooks.preValidation, "notFoundHandler - preValidation", {
|
|
274
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preValidation`,
|
|
275
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
|
|
276
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.preValidation.name?.length > 0 ? hooks.preValidation.name : ANONYMOUS_FUNCTION_NAME
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
if (hooks.preHandler != null) {
|
|
280
|
-
hooks.preHandler = handlerWrapper(hooks.preHandler, "notFoundHandler - preHandler", {
|
|
281
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preHandler`,
|
|
282
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
|
|
283
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.preHandler.name?.length > 0 ? hooks.preHandler.name : ANONYMOUS_FUNCTION_NAME
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
handler = handlerWrapper(handler, "notFoundHandler", {
|
|
287
|
-
[ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,
|
|
288
|
-
[ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
|
|
289
|
-
[ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME
|
|
290
|
-
});
|
|
291
|
-
setNotFoundHandlerOriginal.call(this, hooks, handler);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
function getRequestFromArgs(args) {
|
|
295
|
-
for (const arg of args) {
|
|
296
|
-
if (arg?.routeOptions && arg.url && arg.method) {
|
|
297
|
-
return arg;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return null;
|
|
301
|
-
}
|
|
302
|
-
function handlerWrapper(handler, hookName, spanAttributes = {}) {
|
|
303
|
-
return function handlerWrapped(...args) {
|
|
304
|
-
const instrumentation2 = this[kInstrumentation];
|
|
305
|
-
const request = getRequestFromArgs(args);
|
|
306
|
-
if (request === null) {
|
|
307
|
-
instrumentation2._otelLogger.debug(
|
|
308
|
-
`Ignoring route instrumentation because ${hookName} was called without a Fastify request argument`
|
|
309
|
-
);
|
|
310
|
-
return handler.call(this, ...args);
|
|
311
|
-
}
|
|
312
|
-
if (instrumentation2.isEnabled() === false || request.routeOptions.config?.otel === false) {
|
|
313
|
-
instrumentation2._otelLogger.debug(
|
|
314
|
-
`Ignoring route instrumentation ${request.routeOptions.method} ${request.routeOptions.url} because it is disabled`
|
|
315
|
-
);
|
|
316
|
-
return handler.call(this, ...args);
|
|
317
|
-
}
|
|
318
|
-
const ctx = request[kRequestContext] ?? context.active();
|
|
319
|
-
const handlerName = handler.name?.length > 0 ? handler.name : this.pluginName ?? ANONYMOUS_FUNCTION_NAME;
|
|
320
|
-
const span = instrumentation2.tracer.startSpan(
|
|
321
|
-
`${hookName} - ${handlerName}`,
|
|
322
|
-
{
|
|
323
|
-
attributes: spanAttributes
|
|
324
|
-
},
|
|
325
|
-
ctx
|
|
326
|
-
);
|
|
327
|
-
if (instrumentation2._lifecycleHook != null) {
|
|
328
|
-
try {
|
|
329
|
-
instrumentation2._lifecycleHook(span, {
|
|
330
|
-
hookName,
|
|
331
|
-
request,
|
|
332
|
-
handler: handlerName
|
|
333
|
-
});
|
|
334
|
-
} catch (err) {
|
|
335
|
-
instrumentation2._otelLogger.error({ err }, "Execution of lifecycleHook failed");
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
return context.with(
|
|
339
|
-
trace.setSpan(ctx, span),
|
|
340
|
-
function() {
|
|
341
|
-
try {
|
|
342
|
-
const res = handler.call(this, ...args);
|
|
343
|
-
if (typeof res?.then === "function") {
|
|
344
|
-
return res.then(
|
|
345
|
-
(result) => {
|
|
346
|
-
span.end();
|
|
347
|
-
return result;
|
|
348
|
-
},
|
|
349
|
-
(error) => {
|
|
350
|
-
span.setStatus({
|
|
351
|
-
code: SpanStatusCode.ERROR,
|
|
352
|
-
message: error.message
|
|
353
|
-
});
|
|
354
|
-
if (instrumentation2[kRecordExceptions] !== false) {
|
|
355
|
-
span.recordException(error);
|
|
356
|
-
}
|
|
357
|
-
span.end();
|
|
358
|
-
return Promise.reject(error);
|
|
359
|
-
}
|
|
360
|
-
);
|
|
361
|
-
}
|
|
362
|
-
span.end();
|
|
363
|
-
return res;
|
|
364
|
-
} catch (error) {
|
|
365
|
-
span.setStatus({
|
|
366
|
-
code: SpanStatusCode.ERROR,
|
|
367
|
-
message: error.message
|
|
368
|
-
});
|
|
369
|
-
if (instrumentation2[kRecordExceptions] !== false) {
|
|
370
|
-
span.recordException(error);
|
|
371
|
-
}
|
|
372
|
-
span.end();
|
|
373
|
-
throw error;
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
this
|
|
377
|
-
);
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export { FastifyOtelInstrumentation };
|
|
385
|
-
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/fastify/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright (c) 2024-present The Fastify team <https://github.com/fastify/fastify#team>\n * SPDX-License-Identifier: MIT\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/fastify/otel/tree/bae80d6caef4287e7f01ff3c8dc753243706ea86\n * - Upstream version: @fastify/otel@0.18.1\n * - Converted from JavaScript to TypeScript with minimal type annotations\n * - Removed `ignorePaths` / `minimatch` support (not used by the Sentry integration)\n */\n/* eslint-disable */\n\nimport * as dc from 'node:diagnostics_channel';\nimport { context, trace, SpanStatusCode, propagation, diag, type Span } from '@opentelemetry/api';\nimport {\n ATTR_HTTP_ROUTE,\n ATTR_HTTP_RESPONSE_STATUS_CODE,\n ATTR_HTTP_REQUEST_METHOD,\n ATTR_URL_PATH,\n} from '@opentelemetry/semantic-conventions';\nimport { InstrumentationBase, type InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\nimport { setHttpServerSpanRouteAttribute } from '../../../../utils/setHttpServerSpanRouteAttribute';\n\nconst PACKAGE_VERSION = SDK_VERSION;\nconst PACKAGE_NAME = '@sentry/instrumentation-fastify';\n\nconst SUPPORTED_VERSIONS = '>=4.0.0 <6';\nconst FASTIFY_HOOKS = [\n 'onRequest',\n 'preParsing',\n 'preValidation',\n 'preHandler',\n 'preSerialization',\n 'onSend',\n 'onResponse',\n 'onError',\n];\nconst ATTRIBUTE_NAMES = {\n HOOK_NAME: 'hook.name',\n FASTIFY_TYPE: 'fastify.type',\n HOOK_CALLBACK_NAME: 'hook.callback.name',\n ROOT: 'fastify.root',\n};\nconst HOOK_TYPES = {\n ROUTE: 'route-hook',\n INSTANCE: 'hook',\n HANDLER: 'request-handler',\n};\nconst ANONYMOUS_FUNCTION_NAME = 'anonymous';\n\nconst kInstrumentation = Symbol('fastify otel instance');\nconst kRequestSpan = Symbol('fastify otel request spans');\nconst kRequestContext = Symbol('fastify otel request context');\nconst kAddHookOriginal = Symbol('fastify otel addhook original');\nconst kSetNotFoundOriginal = Symbol('fastify otel setnotfound original');\nconst kRecordExceptions = Symbol('fastify otel record exceptions');\n\nexport interface FastifyOtelInstrumentationOpts extends InstrumentationConfig {\n registerOnInitialization?: boolean;\n requestHook?: (span: Span, request: any) => void;\n lifecycleHook?: (span: Span, info: { hookName: string; request: any; handler?: string }) => void;\n recordExceptions?: boolean;\n}\n\nexport class FastifyOtelInstrumentation extends InstrumentationBase<FastifyOtelInstrumentationOpts> {\n _otelLogger: any = null;\n _requestHook: ((span: Span, request: any) => void) | null = null;\n _lifecycleHook: ((span: Span, info: any) => void) | null = null;\n _handleInitialization: ((message: any) => void) | undefined = undefined;\n\n [kRecordExceptions]: boolean = true;\n\n constructor(config: FastifyOtelInstrumentationOpts = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n this._otelLogger = diag.createComponentLogger({ namespace: PACKAGE_NAME });\n this[kRecordExceptions] = true;\n\n if (config?.recordExceptions != null) {\n if (typeof config.recordExceptions !== 'boolean') {\n throw new TypeError('recordExceptions must be a boolean');\n }\n\n this[kRecordExceptions] = config.recordExceptions;\n }\n if (typeof config?.requestHook === 'function') {\n this._requestHook = config.requestHook;\n }\n if (typeof config?.lifecycleHook === 'function') {\n this._lifecycleHook = config.lifecycleHook;\n }\n }\n\n enable(): any {\n if (this._handleInitialization === undefined && this.getConfig().registerOnInitialization) {\n this._handleInitialization = (message: any) => {\n this.plugin()(message.fastify, undefined, () => {});\n const emptyPlugin: any = (_: any, __: any, done: () => void) => {\n done();\n };\n emptyPlugin[Symbol.for('skip-override')] = true;\n emptyPlugin[Symbol.for('fastify.display-name')] = PACKAGE_NAME;\n message.fastify.register(emptyPlugin);\n };\n dc.subscribe('fastify.initialization', this._handleInitialization);\n }\n return super.enable();\n }\n\n disable(): any {\n if (this._handleInitialization) {\n dc.unsubscribe('fastify.initialization', this._handleInitialization);\n this._handleInitialization = undefined;\n }\n return super.disable();\n }\n\n init() {\n return [];\n }\n\n plugin(): any {\n const instrumentation = this;\n\n const pluginAny = FastifyInstrumentationPlugin as any;\n pluginAny[Symbol.for('skip-override')] = true;\n pluginAny[Symbol.for('fastify.display-name')] = PACKAGE_NAME;\n pluginAny[Symbol.for('plugin-meta')] = {\n fastify: SUPPORTED_VERSIONS,\n name: PACKAGE_NAME,\n };\n\n return FastifyInstrumentationPlugin;\n\n function FastifyInstrumentationPlugin(instance: any, _opts: any, done: () => void) {\n instance.decorate(kInstrumentation, instrumentation);\n instance.decorate(kAddHookOriginal, instance.addHook);\n instance.decorate(kSetNotFoundOriginal, instance.setNotFoundHandler);\n instance.decorateRequest('opentelemetry', function opentelemetry(this: any) {\n const ctx = this[kRequestContext];\n const span = this[kRequestSpan];\n\n return {\n enabled: this.routeOptions.config?.otel !== false,\n span,\n tracer: instrumentation.tracer,\n context: ctx,\n inject: (carrier: any, setter?: any) => {\n return propagation.inject(ctx, carrier, setter);\n },\n extract: (carrier: any, getter?: any) => {\n return propagation.extract(ctx, carrier, getter);\n },\n };\n });\n instance.decorateRequest(kRequestSpan, null);\n instance.decorateRequest(kRequestContext, null);\n\n instance.addHook('onRoute', function otelWireRoute(this: any, routeOptions: any) {\n if (routeOptions.config?.otel === false) {\n instrumentation._otelLogger.debug(\n `Ignoring route instrumentation ${routeOptions.method} ${routeOptions.url} because it is disabled`,\n );\n\n return;\n }\n\n for (const hook of FASTIFY_HOOKS) {\n if (routeOptions[hook] != null) {\n const handlerLike = routeOptions[hook];\n\n if (typeof handlerLike === 'function') {\n routeOptions[hook] = handlerWrapper(handlerLike, hook, {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,\n [ATTR_HTTP_ROUTE]: routeOptions.url,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n handlerLike.name?.length > 0 ? handlerLike.name : ANONYMOUS_FUNCTION_NAME,\n });\n } else if (Array.isArray(handlerLike)) {\n const wrappedHandlers: any[] = [];\n\n for (const handler of handlerLike) {\n wrappedHandlers.push(\n handlerWrapper(handler, hook, {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,\n [ATTR_HTTP_ROUTE]: routeOptions.url,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME,\n }),\n );\n }\n\n routeOptions[hook] = wrappedHandlers;\n }\n }\n }\n\n if (routeOptions.onSend != null) {\n routeOptions.onSend = Array.isArray(routeOptions.onSend)\n ? [...routeOptions.onSend, finalizeResponseSpanHook]\n : [routeOptions.onSend, finalizeResponseSpanHook];\n } else {\n routeOptions.onSend = finalizeResponseSpanHook;\n }\n\n if (routeOptions.onError != null) {\n routeOptions.onError = Array.isArray(routeOptions.onError)\n ? [...routeOptions.onError, recordErrorInSpanHook]\n : [routeOptions.onError, recordErrorInSpanHook];\n } else {\n routeOptions.onError = recordErrorInSpanHook;\n }\n\n routeOptions.handler = handlerWrapper(routeOptions.handler, 'handler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route-handler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.HANDLER,\n [ATTR_HTTP_ROUTE]: routeOptions.url,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n routeOptions.handler.name.length > 0 ? routeOptions.handler.name : ANONYMOUS_FUNCTION_NAME,\n });\n });\n\n instance.addHook(\n 'onRequest',\n function startRequestSpanHook(this: any, request: any, _reply: any, hookDone: () => void) {\n if (this[kInstrumentation].isEnabled() === false || request.routeOptions.config?.otel === false) {\n return hookDone();\n }\n\n let ctx = context.active();\n\n if (trace.getSpan(ctx) == null) {\n ctx = propagation.extract(ctx, request.headers);\n }\n\n if (request.routeOptions.url != null) {\n setHttpServerSpanRouteAttribute(request.routeOptions.url);\n }\n\n const attributes: Record<string, string> = {\n [ATTRIBUTE_NAMES.ROOT]: PACKAGE_NAME,\n [ATTR_HTTP_REQUEST_METHOD]: request.method,\n [ATTR_URL_PATH]: request.url,\n };\n\n if (request.routeOptions.url != null) {\n attributes[ATTR_HTTP_ROUTE] = request.routeOptions.url;\n }\n\n const span = this[kInstrumentation].tracer.startSpan('request', { attributes }, ctx);\n\n try {\n this[kInstrumentation]._requestHook?.(span, request);\n } catch (err) {\n this[kInstrumentation]._otelLogger.error({ err }, 'requestHook threw');\n }\n\n request[kRequestContext] = trace.setSpan(ctx, span);\n request[kRequestSpan] = span;\n\n context.with(request[kRequestContext], () => {\n hookDone();\n });\n },\n );\n\n instance.addHook('onResponse', function finalizeNotFoundSpanHook(request: any, reply: any, hookDone: () => void) {\n const span = request[kRequestSpan];\n\n if (span != null) {\n span.setAttributes({\n [ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode,\n });\n span.end();\n }\n\n request[kRequestSpan] = null;\n\n hookDone();\n });\n\n instance.addHook = addHookPatched;\n instance.setNotFoundHandler = setNotFoundHandlerPatched;\n\n done();\n\n function finalizeResponseSpanHook(\n request: any,\n reply: any,\n payload: any,\n hookDone: (err: null, payload: any) => void,\n ) {\n const span = request[kRequestSpan];\n\n if (span != null) {\n if (reply.statusCode >= 500) {\n span.setStatus({ code: SpanStatusCode.ERROR });\n }\n\n span.setAttributes({\n [ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode,\n });\n span.end();\n }\n\n request[kRequestSpan] = null;\n\n hookDone(null, payload);\n }\n\n function recordErrorInSpanHook(request: any, _reply: any, error: any, hookDone: () => void) {\n const span = request[kRequestSpan];\n\n if (span != null) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n if (instrumentation[kRecordExceptions] !== false) {\n span.recordException(error);\n }\n }\n\n hookDone();\n }\n\n function addHookPatched(this: any, name: string, hook: (...args: any[]) => any) {\n const addHookOriginal = this[kAddHookOriginal];\n\n if (FASTIFY_HOOKS.includes(name)) {\n return addHookOriginal.call(\n this,\n name,\n handlerWrapper(hook, name, {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - ${name}`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hook.name?.length > 0 ? hook.name : ANONYMOUS_FUNCTION_NAME,\n }),\n );\n } else {\n return addHookOriginal.call(this, name, hook);\n }\n }\n\n function setNotFoundHandlerPatched(this: any, hooks: any, handler?: any) {\n const setNotFoundHandlerOriginal = this[kSetNotFoundOriginal];\n if (typeof hooks === 'function') {\n handler = handlerWrapper(hooks, 'notFoundHandler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.name?.length > 0 ? hooks.name : ANONYMOUS_FUNCTION_NAME,\n });\n setNotFoundHandlerOriginal.call(this, handler);\n } else {\n if (hooks.preValidation != null) {\n hooks.preValidation = handlerWrapper(hooks.preValidation, 'notFoundHandler - preValidation', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preValidation`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n hooks.preValidation.name?.length > 0 ? hooks.preValidation.name : ANONYMOUS_FUNCTION_NAME,\n });\n }\n\n if (hooks.preHandler != null) {\n hooks.preHandler = handlerWrapper(hooks.preHandler, 'notFoundHandler - preHandler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preHandler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n hooks.preHandler.name?.length > 0 ? hooks.preHandler.name : ANONYMOUS_FUNCTION_NAME,\n });\n }\n\n handler = handlerWrapper(handler, 'notFoundHandler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME,\n });\n setNotFoundHandlerOriginal.call(this, hooks, handler);\n }\n }\n\n function getRequestFromArgs(args: any[]) {\n for (const arg of args) {\n if (arg?.routeOptions && arg.url && arg.method) {\n return arg;\n }\n }\n return null;\n }\n\n function handlerWrapper(\n handler: (...args: any[]) => any,\n hookName: string,\n spanAttributes: Record<string, string> = {},\n ) {\n return function handlerWrapped(this: any, ...args: any[]) {\n const instrumentation: FastifyOtelInstrumentation = this[kInstrumentation];\n\n const request = getRequestFromArgs(args);\n if (request === null) {\n instrumentation._otelLogger.debug(\n `Ignoring route instrumentation because ${hookName} was called without a Fastify request argument`,\n );\n return handler.call(this, ...args);\n }\n\n if (instrumentation.isEnabled() === false || request.routeOptions.config?.otel === false) {\n instrumentation._otelLogger.debug(\n `Ignoring route instrumentation ${request.routeOptions.method} ${request.routeOptions.url} because it is disabled`,\n );\n return handler.call(this, ...args);\n }\n\n const ctx = request[kRequestContext] ?? context.active();\n const handlerName = handler.name?.length > 0 ? handler.name : (this.pluginName ?? ANONYMOUS_FUNCTION_NAME);\n\n const span = instrumentation.tracer.startSpan(\n `${hookName} - ${handlerName}`,\n {\n attributes: spanAttributes,\n },\n ctx,\n );\n\n if (instrumentation._lifecycleHook != null) {\n try {\n instrumentation._lifecycleHook(span, {\n hookName,\n request,\n handler: handlerName,\n });\n } catch (err) {\n instrumentation._otelLogger.error({ err }, 'Execution of lifecycleHook failed');\n }\n }\n\n return context.with(\n trace.setSpan(ctx, span),\n function (this: any) {\n try {\n const res = handler.call(this, ...args);\n\n if (typeof res?.then === 'function') {\n return res.then(\n (result: any) => {\n span.end();\n return result;\n },\n (error: any) => {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n if (instrumentation[kRecordExceptions] !== false) {\n span.recordException(error);\n }\n span.end();\n return Promise.reject(error);\n },\n );\n }\n\n span.end();\n return res;\n } catch (error: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n if (instrumentation[kRecordExceptions] !== false) {\n span.recordException(error);\n }\n span.end();\n throw error;\n }\n },\n this,\n );\n };\n }\n }\n }\n}\n"],"names":["instrumentation"],"mappings":";;;;;;;AAAA,IAAA,EAAA,EAAA,EAAA;AAwBA,MAAM,eAAA,GAAkB,WAAA;AACxB,MAAM,YAAA,GAAe,iCAAA;AAErB,MAAM,kBAAA,GAAqB,YAAA;AAC3B,MAAM,aAAA,GAAgB;AAAA,EAC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GAAA,EAAK,IAAA,KAAS,UAAA,EAAY;AACnC,kBAAA,OAAO,GAAA,CAAI,IAAA;AAAA,oBACT,CAAC,MAAA,KAAgB;AACf,sBAAA,IAAA,CAAK,GAAA,EAAI;AACT,sBAAA,OAAO,MAAA;AAAA,oBACT,CAAA;AAAA,oBACA,CAAC,KAAA,KAAe;AACd,sBAAA,IAAA,CAAK,SAAA,CAAU;AAAA,wBACb,MAAM,cAAA,CAAe,KAAA;AAAA,wBACrB,SAAS,KAAA,CAAM;AAAA,uBAChB,CAAA;AACD,sBAAA,IAAIA,gBAAAA,CAAgB,iBAAiB,CAAA,KAAM,KAAA,EAAO;AAChD,wBAAA,IAAA,CAAK,gBAAgB,KAAK,CAAA;AAAA,sBAC5B;AACA,sBAAA,IAAA,CAAK,GAAA,EAAI;AACT,sBAAA,OAAO,OAAA,CAAQ,OAAO,KAAK,CAAA;AAAA,oBAC7B;AAAA,mBACF;AAAA,gBACF;AAEA,gBAAA,IAAA,CAAK,GAAA,EAAI;AACT,gBAAA,OAAO,GAAA;AAAA,cACT,SAAS,KAAA,EAAY;AACnB,gBAAA,IAAA,CAAK,SAAA,CAAU;AAAA,kBACb,MAAM,cAAA,CAAe,KAAA;AAAA,kBACrB,SAAS,KAAA,CAAM;AAAA,iBAChB,CAAA;AACD,gBAAA,IAAIA,gBAAAA,CAAgB,iBAAiB,CAAA,KAAM,KAAA,EAAO;AAChD,kBAAA,IAAA,CAAK,gBAAgB,KAAK,CAAA;AAAA,gBAC5B;AACA,gBAAA,IAAA,CAAK,GAAA,EAAI;AACT,gBAAA,MAAM,KAAA;AAAA,cACR;AAAA,YACF,CAAA;AAAA,YACA;AAAA,WACF;AAAA,QACF,CAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeNames.js","sources":["../../../../../../src/integrations/tracing/mysql/vendored/AttributeNames.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql\n * - Upstream version: @opentelemetry/instrumentation-mysql@0.64.0\n */\n/* eslint-disable */\n\n// Mysql specific attributes not covered by semantic conventions\nexport enum AttributeNames {\n MYSQL_VALUES = 'db.mysql.values',\n}\n"],"names":["AttributeNames"],"mappings":"AAWO,IAAK,cAAA,qBAAAA,eAAAA,KAAL;AACL,EAAAA,gBAAA,cAAA,CAAA,GAAe,iBAAA;AADL,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { UndiciRequest, UndiciResponse } from './types';
|
|
2
|
-
export interface ListenerRecord {
|
|
3
|
-
name: string;
|
|
4
|
-
unsubscribe: () => void;
|
|
5
|
-
}
|
|
6
|
-
export interface RequestMessage {
|
|
7
|
-
request: UndiciRequest;
|
|
8
|
-
}
|
|
9
|
-
export interface RequestHeadersMessage {
|
|
10
|
-
request: UndiciRequest;
|
|
11
|
-
socket: any;
|
|
12
|
-
}
|
|
13
|
-
export interface ResponseHeadersMessage {
|
|
14
|
-
request: UndiciRequest;
|
|
15
|
-
response: UndiciResponse;
|
|
16
|
-
}
|
|
17
|
-
export interface RequestTrailersMessage {
|
|
18
|
-
request: UndiciRequest;
|
|
19
|
-
response: UndiciResponse;
|
|
20
|
-
}
|
|
21
|
-
export interface RequestErrorMessage {
|
|
22
|
-
request: UndiciRequest;
|
|
23
|
-
error: Error;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/node-fetch/vendored/internal-types.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;CACd"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const ATTR_HTTP_REQUEST_METHOD: "http.request.method";
|
|
2
|
-
export declare const ATTR_HTTP_REQUEST_METHOD_ORIGINAL: "http.request.method_original";
|
|
3
|
-
export declare const ATTR_HTTP_RESPONSE_STATUS_CODE: "http.response.status_code";
|
|
4
|
-
export declare const ATTR_NETWORK_PEER_ADDRESS: "network.peer.address";
|
|
5
|
-
export declare const ATTR_NETWORK_PEER_PORT: "network.peer.port";
|
|
6
|
-
export declare const ATTR_SERVER_ADDRESS: "server.address";
|
|
7
|
-
export declare const ATTR_SERVER_PORT: "server.port";
|
|
8
|
-
export declare const ATTR_URL_FULL: "url.full";
|
|
9
|
-
export declare const ATTR_URL_PATH: "url.path";
|
|
10
|
-
export declare const ATTR_URL_QUERY: "url.query";
|
|
11
|
-
export declare const ATTR_URL_SCHEME: "url.scheme";
|
|
12
|
-
export declare const ATTR_USER_AGENT_ORIGINAL: "user_agent.original";
|
|
13
|
-
//# sourceMappingURL=semconv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semconv.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/node-fetch/vendored/semconv.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,wBAAwB,EAAG,qBAA8B,CAAC;AACvE,eAAO,MAAM,iCAAiC,EAAG,8BAAuC,CAAC;AACzF,eAAO,MAAM,8BAA8B,EAAG,2BAAoC,CAAC;AACnF,eAAO,MAAM,yBAAyB,EAAG,sBAA+B,CAAC;AACzE,eAAO,MAAM,sBAAsB,EAAG,mBAA4B,CAAC;AACnE,eAAO,MAAM,mBAAmB,EAAG,gBAAyB,CAAC;AAC7D,eAAO,MAAM,gBAAgB,EAAG,aAAsB,CAAC;AACvD,eAAO,MAAM,aAAa,EAAG,UAAmB,CAAC;AACjD,eAAO,MAAM,aAAa,EAAG,UAAmB,CAAC;AACjD,eAAO,MAAM,cAAc,EAAG,WAAoB,CAAC;AACnD,eAAO,MAAM,eAAe,EAAG,YAAqB,CAAC;AACrD,eAAO,MAAM,wBAAwB,EAAG,qBAA8B,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
-
import type { Span, SpanAttributes } from '@sentry/core';
|
|
3
|
-
export interface UndiciRequest {
|
|
4
|
-
origin: string;
|
|
5
|
-
method: string;
|
|
6
|
-
path: string;
|
|
7
|
-
/**
|
|
8
|
-
* Serialized string of headers in the form `name: value\r\n` for v5
|
|
9
|
-
* Array of strings `[key1, value1, key2, value2]`, where values are
|
|
10
|
-
* `string | string[]` for v6
|
|
11
|
-
*/
|
|
12
|
-
headers: string | (string | string[])[];
|
|
13
|
-
/**
|
|
14
|
-
* Helper method to add headers (from v6)
|
|
15
|
-
*/
|
|
16
|
-
addHeader: (name: string, value: string) => void;
|
|
17
|
-
throwOnError: boolean;
|
|
18
|
-
completed: boolean;
|
|
19
|
-
aborted: boolean;
|
|
20
|
-
idempotent: boolean;
|
|
21
|
-
contentLength: number | null;
|
|
22
|
-
contentType: string | null;
|
|
23
|
-
body: any;
|
|
24
|
-
}
|
|
25
|
-
export interface UndiciResponse {
|
|
26
|
-
headers: Buffer[];
|
|
27
|
-
statusCode: number;
|
|
28
|
-
statusText: string;
|
|
29
|
-
}
|
|
30
|
-
export interface IgnoreRequestFunction<T = UndiciRequest> {
|
|
31
|
-
(request: T): boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface RequestHookFunction<T = UndiciRequest> {
|
|
34
|
-
(span: Span, request: T): void;
|
|
35
|
-
}
|
|
36
|
-
export interface ResponseHookFunction<RequestType = UndiciRequest, ResponseType = UndiciResponse> {
|
|
37
|
-
(span: Span, info: {
|
|
38
|
-
request: RequestType;
|
|
39
|
-
response: ResponseType;
|
|
40
|
-
}): void;
|
|
41
|
-
}
|
|
42
|
-
export interface StartSpanHookFunction<T = UndiciRequest> {
|
|
43
|
-
(request: T): SpanAttributes;
|
|
44
|
-
}
|
|
45
|
-
export interface UndiciInstrumentationConfig<RequestType = UndiciRequest, ResponseType = UndiciResponse> extends InstrumentationConfig {
|
|
46
|
-
/** Not trace all outgoing requests that matched with custom function */
|
|
47
|
-
ignoreRequestHook?: IgnoreRequestFunction<RequestType>;
|
|
48
|
-
/** Function for adding custom attributes before request is handled */
|
|
49
|
-
requestHook?: RequestHookFunction<RequestType>;
|
|
50
|
-
/** Function called once response headers have been received */
|
|
51
|
-
responseHook?: ResponseHookFunction<RequestType, ResponseType>;
|
|
52
|
-
/** Function for adding custom attributes before a span is started */
|
|
53
|
-
startSpanHook?: StartSpanHookFunction<RequestType>;
|
|
54
|
-
/** Map the following HTTP headers to span attributes. */
|
|
55
|
-
headersToSpanAttributes?: {
|
|
56
|
-
requestHeaders?: string[];
|
|
57
|
-
responseHeaders?: string[];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot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C;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5E;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,aAAa;IACtD,CAAC,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;CAC9B;AAID,MAAM,WAAW,2BAA2B,CAC1C,WAAW,GAAG,aAAa,EAC3B,YAAY,GAAG,cAAc,CAC7B,SAAQ,qBAAqB;IAC7B,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACvD,sEAAsE;IACtE,WAAW,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC/C,+DAA+D;IAC/D,YAAY,CAAC,EAAE,oBAAoB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAC/D,qEAAqE;IACrE,aAAa,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACnD,yDAAyD;IACzD,uBAAuB,CAAC,EAAE;QACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC;CACH"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { UndiciInstrumentationConfig } from './types';
|
|
2
|
-
export declare class UndiciInstrumentation {
|
|
3
|
-
private _channelSubs;
|
|
4
|
-
private _spanFromReq;
|
|
5
|
-
private _propagationDecisionMap;
|
|
6
|
-
private _config;
|
|
7
|
-
constructor(config?: UndiciInstrumentationConfig);
|
|
8
|
-
disable(): void;
|
|
9
|
-
/** Subscribe to the undici diagnostics channels (idempotent). */
|
|
10
|
-
enable(): void;
|
|
11
|
-
private subscribeToChannel;
|
|
12
|
-
private parseRequestHeaders;
|
|
13
|
-
private onRequestCreated;
|
|
14
|
-
private onRequestHeaders;
|
|
15
|
-
private onResponseHeaders;
|
|
16
|
-
private onDone;
|
|
17
|
-
private onError;
|
|
18
|
-
private injectTracePropagationHeaders;
|
|
19
|
-
private getRequestMethod;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=undici.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"undici.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/node-fetch/vendored/undici.ts"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,2BAA2B,EAAiB,MAAM,SAAS,CAAC;AAiB1E,qBAAa,qBAAqB;IAEhC,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,YAAY,CAAsC;IAE1D,OAAO,CAAC,uBAAuB,CAAoC;IACnE,OAAO,CAAC,OAAO,CAA8B;gBAEjC,MAAM,GAAE,2BAAgC;IAI7C,OAAO,IAAI,IAAI;IAKtB,iEAAiE;IAC1D,MAAM,IAAI,IAAI;IAarB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,mBAAmB;IA+C3B,OAAO,CAAC,gBAAgB;IA0FxB,OAAO,CAAC,gBAAgB;IAkCxB,OAAO,CAAC,iBAAiB;IAqDzB,OAAO,CAAC,MAAM;IAiBd,OAAO,CAAC,OAAO;IAwBf,OAAO,CAAC,6BAA6B;IAmCrC,OAAO,CAAC,gBAAgB;CAqBzB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { AmqplibInstrumentationConfig } from './types';
|
|
3
|
-
export declare class AmqplibInstrumentation extends InstrumentationBase<AmqplibInstrumentationConfig> {
|
|
4
|
-
private _netSemconvStability;
|
|
5
|
-
constructor(config?: AmqplibInstrumentationConfig);
|
|
6
|
-
private _setSemconvStabilityFromEnv;
|
|
7
|
-
setConfig(config?: AmqplibInstrumentationConfig): void;
|
|
8
|
-
protected init(): InstrumentationNodeModuleDefinition;
|
|
9
|
-
private patchConnect;
|
|
10
|
-
private unpatchConnect;
|
|
11
|
-
private patchChannelModel;
|
|
12
|
-
private unpatchChannelModel;
|
|
13
|
-
private getConnectPatch;
|
|
14
|
-
private getChannelEmitPatch;
|
|
15
|
-
private getAckAllPatch;
|
|
16
|
-
private getAckPatch;
|
|
17
|
-
private getConsumePatch;
|
|
18
|
-
private getConfirmedPublishPatch;
|
|
19
|
-
private getPublishPatch;
|
|
20
|
-
private createPublishSpan;
|
|
21
|
-
private endConsumerSpan;
|
|
22
|
-
private endAllSpansOnChannel;
|
|
23
|
-
private callConsumeEndHook;
|
|
24
|
-
private checkConsumeTimeoutOnChannel;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=amqplib.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"amqplib.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/amqplib.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EAKpC,MAAM,gCAAgC,CAAC;AAaxC,OAAO,EAAE,4BAA4B,EAAmE,MAAM,SAAS,CAAC;AAwBxH,qBAAa,sBAAuB,SAAQ,mBAAmB,CAAC,4BAA4B,CAAC;IAC3F,OAAO,CAAC,oBAAoB,CAAoB;gBAEpC,MAAM,GAAE,4BAAiC;IAMrD,OAAO,CAAC,2BAA2B;IAI1B,SAAS,CAAC,MAAM,GAAE,4BAAiC;IAI5D,SAAS,CAAC,IAAI;IA8Bd,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,iBAAiB;IAuCzB,OAAO,CAAC,mBAAmB;IA+B3B,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,eAAe;IAoGvB,OAAO,CAAC,wBAAwB;IAmFhC,OAAO,CAAC,eAAe;IAgDvB,OAAO,CAAC,iBAAiB;IA6BzB,OAAO,CAAC,eAAe;IAwBvB,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,4BAA4B;CAerC"}
|