@depup/sentry__node 10.44.0-depup.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/LICENSE +21 -0
- package/README.md +31 -0
- package/build/cjs/debug-build.js +11 -0
- package/build/cjs/debug-build.js.map +1 -0
- package/build/cjs/index.js +216 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/init.js +10 -0
- package/build/cjs/init.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/growthbook.js +12 -0
- package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js +43 -0
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/openFeature.js +55 -0
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/statsig.js +23 -0
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/unleash.js +23 -0
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -0
- package/build/cjs/integrations/fs.js +142 -0
- package/build/cjs/integrations/fs.js.map +1 -0
- package/build/cjs/integrations/http.js +224 -0
- package/build/cjs/integrations/http.js.map +1 -0
- package/build/cjs/integrations/node-fetch.js +108 -0
- package/build/cjs/integrations/node-fetch.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib.js +47 -0
- package/build/cjs/integrations/tracing/amqplib.js.map +1 -0
- package/build/cjs/integrations/tracing/anthropic-ai/index.js +79 -0
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -0
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +95 -0
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/connect.js +110 -0
- package/build/cjs/integrations/tracing/connect.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader.js +72 -0
- package/build/cjs/integrations/tracing/dataloader.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +166 -0
- package/build/cjs/integrations/tracing/express.js.map +1 -0
- package/build/cjs/integrations/tracing/fastify/index.js +270 -0
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -0
- package/build/cjs/integrations/tracing/fastify/v3/constants.js +23 -0
- package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +37 -0
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +304 -0
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/fastify/v3/utils.js +135 -0
- package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/firebase.js +50 -0
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +44 -0
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +297 -0
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +265 -0
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -0
- package/build/cjs/integrations/tracing/genericPool.js +59 -0
- package/build/cjs/integrations/tracing/genericPool.js.map +1 -0
- package/build/cjs/integrations/tracing/google-genai/index.js +78 -0
- package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -0
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +88 -0
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql.js +127 -0
- package/build/cjs/integrations/tracing/graphql.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +135 -0
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/constants.js +15 -0
- package/build/cjs/integrations/tracing/hono/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/index.js +137 -0
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/instrumentation.js +236 -0
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/index.js +110 -0
- package/build/cjs/integrations/tracing/index.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka.js +48 -0
- package/build/cjs/integrations/tracing/kafka.js.map +1 -0
- package/build/cjs/integrations/tracing/knex.js +57 -0
- package/build/cjs/integrations/tracing/knex.js.map +1 -0
- package/build/cjs/integrations/tracing/koa.js +138 -0
- package/build/cjs/integrations/tracing/koa.js.map +1 -0
- package/build/cjs/integrations/tracing/langchain/index.js +116 -0
- package/build/cjs/integrations/tracing/langchain/index.js.map +1 -0
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +220 -0
- package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/langgraph/index.js +93 -0
- package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -0
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +60 -0
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/lrumemoizer.js +37 -0
- package/build/cjs/integrations/tracing/lrumemoizer.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo.js +93 -0
- package/build/cjs/integrations/tracing/mongo.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose.js +46 -0
- package/build/cjs/integrations/tracing/mongoose.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql.js +38 -0
- package/build/cjs/integrations/tracing/mysql.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2.js +46 -0
- package/build/cjs/integrations/tracing/mysql2.js.map +1 -0
- package/build/cjs/integrations/tracing/openai/index.js +78 -0
- package/build/cjs/integrations/tracing/openai/index.js.map +1 -0
- package/build/cjs/integrations/tracing/openai/instrumentation.js +104 -0
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres.js +48 -0
- package/build/cjs/integrations/tracing/postgres.js.map +1 -0
- package/build/cjs/integrations/tracing/postgresjs.js +378 -0
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma.js +203 -0
- package/build/cjs/integrations/tracing/prisma.js.map +1 -0
- package/build/cjs/integrations/tracing/redis.js +121 -0
- package/build/cjs/integrations/tracing/redis.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious.js +67 -0
- package/build/cjs/integrations/tracing/tedious.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/constants.js +6 -0
- package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/index.js +82 -0
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +274 -0
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -0
- package/build/cjs/preload.js +21 -0
- package/build/cjs/preload.js.map +1 -0
- package/build/cjs/sdk/index.js +78 -0
- package/build/cjs/sdk/index.js.map +1 -0
- package/build/cjs/sdk/initOtel.js +126 -0
- package/build/cjs/sdk/initOtel.js.map +1 -0
- package/build/cjs/utils/redisCache.js +122 -0
- package/build/cjs/utils/redisCache.js.map +1 -0
- package/build/esm/debug-build.js +9 -0
- package/build/esm/debug-build.js.map +1 -0
- package/build/esm/index.js +44 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/init.js +10 -0
- package/build/esm/init.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/growthbook.js +10 -0
- package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/launchDarkly.js +40 -0
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/openFeature.js +52 -0
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/statsig.js +21 -0
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/unleash.js +21 -0
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -0
- package/build/esm/integrations/fs.js +140 -0
- package/build/esm/integrations/fs.js.map +1 -0
- package/build/esm/integrations/http.js +219 -0
- package/build/esm/integrations/http.js.map +1 -0
- package/build/esm/integrations/node-fetch.js +105 -0
- package/build/esm/integrations/node-fetch.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib.js +44 -0
- package/build/esm/integrations/tracing/amqplib.js.map +1 -0
- package/build/esm/integrations/tracing/anthropic-ai/index.js +76 -0
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -0
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +93 -0
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/connect.js +106 -0
- package/build/esm/integrations/tracing/connect.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader.js +69 -0
- package/build/esm/integrations/tracing/dataloader.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +161 -0
- package/build/esm/integrations/tracing/express.js.map +1 -0
- package/build/esm/integrations/tracing/fastify/index.js +265 -0
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -0
- package/build/esm/integrations/tracing/fastify/v3/constants.js +21 -0
- package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -0
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +37 -0
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +302 -0
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/fastify/v3/utils.js +131 -0
- package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/firebase.js +47 -0
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +42 -0
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +294 -0
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +262 -0
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -0
- package/build/esm/integrations/tracing/genericPool.js +56 -0
- package/build/esm/integrations/tracing/genericPool.js.map +1 -0
- package/build/esm/integrations/tracing/google-genai/index.js +75 -0
- package/build/esm/integrations/tracing/google-genai/index.js.map +1 -0
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +86 -0
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/graphql.js +124 -0
- package/build/esm/integrations/tracing/graphql.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +130 -0
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -0
- package/build/esm/integrations/tracing/hono/constants.js +12 -0
- package/build/esm/integrations/tracing/hono/constants.js.map +1 -0
- package/build/esm/integrations/tracing/hono/index.js +133 -0
- package/build/esm/integrations/tracing/hono/index.js.map +1 -0
- package/build/esm/integrations/tracing/hono/instrumentation.js +234 -0
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/index.js +107 -0
- package/build/esm/integrations/tracing/index.js.map +1 -0
- package/build/esm/integrations/tracing/kafka.js +45 -0
- package/build/esm/integrations/tracing/kafka.js.map +1 -0
- package/build/esm/integrations/tracing/knex.js +54 -0
- package/build/esm/integrations/tracing/knex.js.map +1 -0
- package/build/esm/integrations/tracing/koa.js +134 -0
- package/build/esm/integrations/tracing/koa.js.map +1 -0
- package/build/esm/integrations/tracing/langchain/index.js +113 -0
- package/build/esm/integrations/tracing/langchain/index.js.map +1 -0
- package/build/esm/integrations/tracing/langchain/instrumentation.js +218 -0
- package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/langgraph/index.js +90 -0
- package/build/esm/integrations/tracing/langgraph/index.js.map +1 -0
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +58 -0
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/lrumemoizer.js +34 -0
- package/build/esm/integrations/tracing/lrumemoizer.js.map +1 -0
- package/build/esm/integrations/tracing/mongo.js +89 -0
- package/build/esm/integrations/tracing/mongo.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose.js +43 -0
- package/build/esm/integrations/tracing/mongoose.js.map +1 -0
- package/build/esm/integrations/tracing/mysql.js +35 -0
- package/build/esm/integrations/tracing/mysql.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2.js +43 -0
- package/build/esm/integrations/tracing/mysql2.js.map +1 -0
- package/build/esm/integrations/tracing/openai/index.js +75 -0
- package/build/esm/integrations/tracing/openai/index.js.map +1 -0
- package/build/esm/integrations/tracing/openai/instrumentation.js +102 -0
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/postgres.js +45 -0
- package/build/esm/integrations/tracing/postgres.js.map +1 -0
- package/build/esm/integrations/tracing/postgresjs.js +374 -0
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -0
- package/build/esm/integrations/tracing/prisma.js +200 -0
- package/build/esm/integrations/tracing/prisma.js.map +1 -0
- package/build/esm/integrations/tracing/redis.js +117 -0
- package/build/esm/integrations/tracing/redis.js.map +1 -0
- package/build/esm/integrations/tracing/tedious.js +64 -0
- package/build/esm/integrations/tracing/tedious.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/constants.js +4 -0
- package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/index.js +79 -0
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +269 -0
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -0
- package/build/esm/package.json +1 -0
- package/build/esm/preload.js +21 -0
- package/build/esm/preload.js.map +1 -0
- package/build/esm/sdk/index.js +73 -0
- package/build/esm/sdk/index.js.map +1 -0
- package/build/esm/sdk/initOtel.js +121 -0
- package/build/esm/sdk/initOtel.js.map +1 -0
- package/build/esm/utils/redisCache.js +114 -0
- package/build/esm/utils/redisCache.js.map +1 -0
- package/build/import-hook.mjs +5 -0
- package/build/loader-hook.mjs +1 -0
- package/build/types/debug-build.d.ts +7 -0
- package/build/types/debug-build.d.ts.map +1 -0
- package/build/types/index.d.ts +42 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/init.d.ts +2 -0
- package/build/types/init.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/growthbook.d.ts +6 -0
- package/build/types/integrations/featureFlagShims/growthbook.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/index.d.ts +6 -0
- package/build/types/integrations/featureFlagShims/index.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/openFeature.d.ts +23 -0
- package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/statsig.d.ts +6 -0
- package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/unleash.d.ts +6 -0
- package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -0
- package/build/types/integrations/fs.d.ts +24 -0
- package/build/types/integrations/fs.d.ts.map +1 -0
- package/build/types/integrations/http.d.ts +136 -0
- package/build/types/integrations/http.d.ts.map +1 -0
- package/build/types/integrations/node-fetch.d.ts +36 -0
- package/build/types/integrations/node-fetch.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib.d.ts +20 -0
- package/build/types/integrations/tracing/amqplib.d.ts.map +1 -0
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts +59 -0
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts +19 -0
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect.d.ts +46 -0
- package/build/types/integrations/tracing/connect.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader.d.ts +20 -0
- package/build/types/integrations/tracing/dataloader.d.ts.map +1 -0
- package/build/types/integrations/tracing/express.d.ts +72 -0
- package/build/types/integrations/tracing/express.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/index.d.ts +119 -0
- package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/types.d.ts +33 -0
- package/build/types/integrations/tracing/fastify/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/v3/constants.d.ts +3 -0
- package/build/types/integrations/tracing/fastify/v3/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts +15 -0
- package/build/types/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts +16 -0
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/v3/internal-types.d.ts +7 -0
- package/build/types/integrations/tracing/fastify/v3/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/v3/types.d.ts +21 -0
- package/build/types/integrations/tracing/fastify/v3/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/v3/utils.d.ts +28 -0
- package/build/types/integrations/tracing/fastify/v3/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/firebase.d.ts +6 -0
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/index.d.ts +2 -0
- package/build/types/integrations/tracing/firebase/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +19 -0
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/otel/index.d.ts +3 -0
- package/build/types/integrations/tracing/firebase/otel/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +25 -0
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +23 -0
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -0
- package/build/types/integrations/tracing/firebase/otel/types.d.ts +120 -0
- package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool.d.ts +20 -0
- package/build/types/integrations/tracing/genericPool.d.ts.map +1 -0
- package/build/types/integrations/tracing/google-genai/index.d.ts +59 -0
- package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts +20 -0
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql.d.ts +48 -0
- package/build/types/integrations/tracing/graphql.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts +50 -0
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/types.d.ts +166 -0
- package/build/types/integrations/tracing/hapi/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/constants.d.ts +11 -0
- package/build/types/integrations/tracing/hono/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/index.d.ts +52 -0
- package/build/types/integrations/tracing/hono/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/instrumentation.d.ts +55 -0
- package/build/types/integrations/tracing/hono/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/types.d.ts +36 -0
- package/build/types/integrations/tracing/hono/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/index.d.ts +12 -0
- package/build/types/integrations/tracing/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka.d.ts +19 -0
- package/build/types/integrations/tracing/kafka.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex.d.ts +20 -0
- package/build/types/integrations/tracing/knex.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa.d.ts +70 -0
- package/build/types/integrations/tracing/koa.d.ts.map +1 -0
- package/build/types/integrations/tracing/langchain/index.d.ts +97 -0
- package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts +29 -0
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/langgraph/index.d.ts +74 -0
- package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +19 -0
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/lrumemoizer.d.ts +19 -0
- package/build/types/integrations/tracing/lrumemoizer.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo.d.ts +24 -0
- package/build/types/integrations/tracing/mongo.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose.d.ts +20 -0
- package/build/types/integrations/tracing/mongoose.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql.d.ts +20 -0
- package/build/types/integrations/tracing/mysql.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2.d.ts +20 -0
- package/build/types/integrations/tracing/mysql2.d.ts.map +1 -0
- package/build/types/integrations/tracing/openai/index.d.ts +59 -0
- package/build/types/integrations/tracing/openai/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/openai/instrumentation.d.ts +26 -0
- package/build/types/integrations/tracing/openai/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres.d.ts +24 -0
- package/build/types/integrations/tracing/postgres.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgresjs.d.ts +101 -0
- package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +38 -0
- package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +31 -0
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma.d.ts +50 -0
- package/build/types/integrations/tracing/prisma.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis.d.ts +41 -0
- package/build/types/integrations/tracing/redis.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious.d.ts +20 -0
- package/build/types/integrations/tracing/tedious.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/constants.d.ts +2 -0
- package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/index.d.ts +43 -0
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +56 -0
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/types.d.ts +59 -0
- package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -0
- package/build/types/preload.d.ts +2 -0
- package/build/types/preload.d.ts.map +1 -0
- package/build/types/sdk/index.d.ts +18 -0
- package/build/types/sdk/index.d.ts.map +1 -0
- package/build/types/sdk/initOtel.d.ts +28 -0
- package/build/types/sdk/initOtel.d.ts.map +1 -0
- package/build/types/types.d.ts +89 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/types/utils/redisCache.d.ts +16 -0
- package/build/types/utils/redisCache.d.ts.map +1 -0
- package/build/types-ts3.8/debug-build.d.ts +7 -0
- package/build/types-ts3.8/index.d.ts +42 -0
- package/build/types-ts3.8/init.d.ts +2 -0
- package/build/types-ts3.8/integrations/featureFlagShims/growthbook.d.ts +6 -0
- package/build/types-ts3.8/integrations/featureFlagShims/index.d.ts +6 -0
- package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
- package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +23 -0
- package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +6 -0
- package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +6 -0
- package/build/types-ts3.8/integrations/fs.d.ts +24 -0
- package/build/types-ts3.8/integrations/http.d.ts +139 -0
- package/build/types-ts3.8/integrations/node-fetch.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/amqplib.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +59 -0
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/instrumentation.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/connect.d.ts +46 -0
- package/build/types-ts3.8/integrations/tracing/dataloader.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/express.d.ts +72 -0
- package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +119 -0
- package/build/types-ts3.8/integrations/tracing/fastify/types.d.ts +33 -0
- package/build/types-ts3.8/integrations/tracing/fastify/v3/constants.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/fastify/v3/instrumentation.d.ts +16 -0
- package/build/types-ts3.8/integrations/tracing/fastify/v3/internal-types.d.ts +7 -0
- package/build/types-ts3.8/integrations/tracing/fastify/v3/types.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/fastify/v3/utils.d.ts +28 -0
- package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/firebase/index.d.ts +2 -0
- package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/firebase/otel/index.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +23 -0
- package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +120 -0
- package/build/types-ts3.8/integrations/tracing/genericPool.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +59 -0
- package/build/types-ts3.8/integrations/tracing/google-genai/instrumentation.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/graphql.d.ts +48 -0
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +50 -0
- package/build/types-ts3.8/integrations/tracing/hapi/types.d.ts +166 -0
- package/build/types-ts3.8/integrations/tracing/hono/constants.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +52 -0
- package/build/types-ts3.8/integrations/tracing/hono/instrumentation.d.ts +55 -0
- package/build/types-ts3.8/integrations/tracing/hono/types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/index.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/kafka.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/knex.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/koa.d.ts +70 -0
- package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +97 -0
- package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +29 -0
- package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +74 -0
- package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/lrumemoizer.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/mongo.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/mongoose.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/mysql.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/mysql2.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +59 -0
- package/build/types-ts3.8/integrations/tracing/openai/instrumentation.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/postgres.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +101 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +44 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +34 -0
- package/build/types-ts3.8/integrations/tracing/prisma.d.ts +50 -0
- package/build/types-ts3.8/integrations/tracing/redis.d.ts +41 -0
- package/build/types-ts3.8/integrations/tracing/tedious.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +2 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +43 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +56 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +59 -0
- package/build/types-ts3.8/preload.d.ts +2 -0
- package/build/types-ts3.8/sdk/index.d.ts +18 -0
- package/build/types-ts3.8/sdk/initOtel.d.ts +31 -0
- package/build/types-ts3.8/types.d.ts +89 -0
- package/build/types-ts3.8/utils/redisCache.d.ts +16 -0
- package/changes.json +10 -0
- package/package.json +150 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Span } from '@opentelemetry/api';
|
|
2
|
+
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
3
|
+
export interface FirebaseOptions {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
authDomain?: string;
|
|
7
|
+
databaseURL?: string;
|
|
8
|
+
projectId?: string;
|
|
9
|
+
storageBucket?: string;
|
|
10
|
+
messagingSenderId?: string;
|
|
11
|
+
appId?: string;
|
|
12
|
+
measurementId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface FirebaseApp {
|
|
15
|
+
name: string;
|
|
16
|
+
options: FirebaseOptions;
|
|
17
|
+
automaticDataCollectionEnabled: boolean;
|
|
18
|
+
delete(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export interface DocumentData {
|
|
21
|
+
[field: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export type WithFieldValue<T> = T;
|
|
24
|
+
export type PartialWithFieldValue<T> = Partial<T>;
|
|
25
|
+
export interface SetOptions {
|
|
26
|
+
merge?: boolean;
|
|
27
|
+
mergeFields?: (string | number | symbol)[];
|
|
28
|
+
}
|
|
29
|
+
export interface DocumentReference<T = DocumentData, U extends DocumentData = DocumentData> {
|
|
30
|
+
id: string;
|
|
31
|
+
firestore: {
|
|
32
|
+
app: FirebaseApp;
|
|
33
|
+
settings: FirestoreSettings;
|
|
34
|
+
useEmulator: (host: string, port: number) => void;
|
|
35
|
+
toJSON: () => {
|
|
36
|
+
app: FirebaseApp;
|
|
37
|
+
settings: FirestoreSettings;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type: 'collection' | 'document' | string;
|
|
41
|
+
path: string;
|
|
42
|
+
parent: CollectionReference<T, U>;
|
|
43
|
+
}
|
|
44
|
+
export interface CollectionReference<T = DocumentData, U extends DocumentData = DocumentData> {
|
|
45
|
+
id: string;
|
|
46
|
+
firestore: {
|
|
47
|
+
app: FirebaseApp;
|
|
48
|
+
settings: FirestoreSettings;
|
|
49
|
+
useEmulator: (host: string, port: number) => void;
|
|
50
|
+
toJSON: () => {
|
|
51
|
+
app: FirebaseApp;
|
|
52
|
+
settings: FirestoreSettings;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
type: string;
|
|
56
|
+
path: string;
|
|
57
|
+
parent: DocumentReference<T, U> | null;
|
|
58
|
+
}
|
|
59
|
+
export interface QuerySnapshot<T = DocumentData, U extends DocumentData = DocumentData> {
|
|
60
|
+
docs: Array<DocumentReference<T, U>>;
|
|
61
|
+
size: number;
|
|
62
|
+
empty: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface FirestoreSettings {
|
|
65
|
+
host?: string;
|
|
66
|
+
ssl?: boolean;
|
|
67
|
+
ignoreUndefinedProperties?: boolean;
|
|
68
|
+
cacheSizeBytes?: number;
|
|
69
|
+
experimentalForceLongPolling?: boolean;
|
|
70
|
+
experimentalAutoDetectLongPolling?: boolean;
|
|
71
|
+
useFetchStreams?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Firebase Auto Instrumentation
|
|
75
|
+
*/
|
|
76
|
+
export interface FirebaseInstrumentationConfig extends InstrumentationConfig {
|
|
77
|
+
firestoreSpanCreationHook?: FirestoreSpanCreationHook;
|
|
78
|
+
functions?: FunctionsConfig;
|
|
79
|
+
}
|
|
80
|
+
export interface FunctionsConfig {
|
|
81
|
+
requestHook?: RequestHook;
|
|
82
|
+
responseHook?: ResponseHook;
|
|
83
|
+
errorHook?: ErrorHook;
|
|
84
|
+
}
|
|
85
|
+
export type RequestHook = (span: Span) => void;
|
|
86
|
+
export type ResponseHook = (span: Span, error?: unknown) => void;
|
|
87
|
+
export type ErrorHook = (span: Span, error?: unknown) => Promise<void> | void;
|
|
88
|
+
export interface FirestoreSpanCreationHook {
|
|
89
|
+
(span: Span): void;
|
|
90
|
+
}
|
|
91
|
+
export type GetDocsType<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> = (query: CollectionReference<AppModelType, DbModelType>) => Promise<QuerySnapshot<AppModelType, DbModelType>>;
|
|
92
|
+
export type SetDocType<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> = ((reference: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>) => Promise<void>) & ((reference: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions) => Promise<void>);
|
|
93
|
+
export type AddDocType<AppModelType, DbModelType extends DocumentData> = (reference: CollectionReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>) => Promise<DocumentReference<AppModelType, DbModelType>>;
|
|
94
|
+
export type DeleteDocType<AppModelType, DbModelType extends DocumentData> = (reference: DocumentReference<AppModelType, DbModelType>) => Promise<void>;
|
|
95
|
+
export type OverloadedParameters<T> = T extends {
|
|
96
|
+
(...args: infer A1): unknown;
|
|
97
|
+
(...args: infer A2): unknown;
|
|
98
|
+
} ? A1 | A2 : T extends (...args: infer A) => unknown ? A : unknown;
|
|
99
|
+
/**
|
|
100
|
+
* A bare minimum of how Cloud Functions for Firebase (v2) are defined.
|
|
101
|
+
*/
|
|
102
|
+
export type FirebaseFunctions = ((handler: () => Promise<unknown> | unknown) => (...args: unknown[]) => Promise<unknown> | unknown) | ((documentOrOptions: string | string[] | Record<string, unknown>, handler: () => Promise<unknown> | unknown) => (...args: unknown[]) => Promise<unknown> | unknown);
|
|
103
|
+
export type AvailableFirebaseFunctions = {
|
|
104
|
+
onRequest: FirebaseFunctions;
|
|
105
|
+
onCall: FirebaseFunctions;
|
|
106
|
+
onDocumentCreated: FirebaseFunctions;
|
|
107
|
+
onDocumentUpdated: FirebaseFunctions;
|
|
108
|
+
onDocumentDeleted: FirebaseFunctions;
|
|
109
|
+
onDocumentWritten: FirebaseFunctions;
|
|
110
|
+
onDocumentCreatedWithAuthContext: FirebaseFunctions;
|
|
111
|
+
onDocumentUpdatedWithAuthContext: FirebaseFunctions;
|
|
112
|
+
onDocumentDeletedWithAuthContext: FirebaseFunctions;
|
|
113
|
+
onDocumentWrittenWithAuthContext: FirebaseFunctions;
|
|
114
|
+
onSchedule: FirebaseFunctions;
|
|
115
|
+
onObjectFinalized: FirebaseFunctions;
|
|
116
|
+
onObjectArchived: FirebaseFunctions;
|
|
117
|
+
onObjectDeleted: FirebaseFunctions;
|
|
118
|
+
onObjectMetadataUpdated: FirebaseFunctions;
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/firebase/otel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAI5E,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;IACzB,8BAA8B,EAAE,OAAO,CAAC;IACxC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAGD,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC;AAElC,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,YAAY,EAAE,CAAC,SAAS,YAAY,GAAG,YAA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O,CAAC,GACnG,CAAC,CACC,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,KACtC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAE7D,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gCAAgC,EAAE,iBAAiB,CAAC;IACpD,gCAAgC,EAAE,iBAAiB,CAAC;IACpD,gCAAgC,EAAE,iBAAiB,CAAC;IACpD,gCAAgC,EAAE,iBAAiB,CAAC;IACpD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,eAAe,EAAE,iBAAiB,CAAC;IACnC,uBAAuB,EAAE,iBAAiB,CAAC;CAC5C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GenericPoolInstrumentation } from '@opentelemetry/instrumentation-generic-pool';
|
|
2
|
+
export declare const instrumentGenericPool: ((options?: unknown) => GenericPoolInstrumentation) & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library.
|
|
7
|
+
*
|
|
8
|
+
* For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```javascript
|
|
12
|
+
* const Sentry = require('@sentry/node');
|
|
13
|
+
*
|
|
14
|
+
* Sentry.init({
|
|
15
|
+
* integrations: [Sentry.genericPoolIntegration()],
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const genericPoolIntegration: () => import("@sentry/core").Integration;
|
|
20
|
+
//# sourceMappingURL=genericPool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericPool.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/genericPool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAOzF,eAAO,MAAM,qBAAqB;;CAAqF,CAAC;AAgCxH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,0CAA6C,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { GoogleGenAIOptions } from '@sentry/core';
|
|
2
|
+
export declare const instrumentGoogleGenAI: ((options?: GoogleGenAIOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Adds Sentry tracing instrumentation for the Google Generative AI SDK.
|
|
7
|
+
*
|
|
8
|
+
* This integration is enabled by default.
|
|
9
|
+
*
|
|
10
|
+
* When configured, this integration automatically instruments Google GenAI SDK client instances
|
|
11
|
+
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* import * as Sentry from '@sentry/node';
|
|
16
|
+
*
|
|
17
|
+
* Sentry.init({
|
|
18
|
+
* integrations: [Sentry.googleGenAiIntegration()],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* ## Options
|
|
23
|
+
*
|
|
24
|
+
* - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
|
|
25
|
+
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
|
|
26
|
+
*
|
|
27
|
+
* ### Default Behavior
|
|
28
|
+
*
|
|
29
|
+
* By default, the integration will:
|
|
30
|
+
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
|
|
31
|
+
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```javascript
|
|
35
|
+
* // Record inputs and outputs when sendDefaultPii is false
|
|
36
|
+
* Sentry.init({
|
|
37
|
+
* integrations: [
|
|
38
|
+
* Sentry.googleGenAiIntegration({
|
|
39
|
+
* recordInputs: true,
|
|
40
|
+
* recordOutputs: true
|
|
41
|
+
* })
|
|
42
|
+
* ],
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Never record inputs/outputs regardless of sendDefaultPii
|
|
46
|
+
* Sentry.init({
|
|
47
|
+
* sendDefaultPii: true,
|
|
48
|
+
* integrations: [
|
|
49
|
+
* Sentry.googleGenAiIntegration({
|
|
50
|
+
* recordInputs: false,
|
|
51
|
+
* recordOutputs: false
|
|
52
|
+
* })
|
|
53
|
+
* ],
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export declare const googleGenAIIntegration: (options?: GoogleGenAIOptions | undefined) => import("@sentry/core").Integration;
|
|
59
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/google-genai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,cAAc,CAAC;AAKtE,eAAO,MAAM,qBAAqB;;CAGjC,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,sBAAsB,kFAA6C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InstrumentationConfig, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
3
|
+
import type { GoogleGenAIOptions } from '@sentry/core';
|
|
4
|
+
type GoogleGenAIInstrumentationOptions = GoogleGenAIOptions & InstrumentationConfig;
|
|
5
|
+
/**
|
|
6
|
+
* Sentry Google GenAI instrumentation using OpenTelemetry.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SentryGoogleGenAiInstrumentation extends InstrumentationBase<GoogleGenAIInstrumentationOptions> {
|
|
9
|
+
constructor(config?: GoogleGenAIInstrumentationOptions);
|
|
10
|
+
/**
|
|
11
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
12
|
+
*/
|
|
13
|
+
init(): InstrumentationModuleDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* Core patch logic applying instrumentation to the Google GenAI client constructor.
|
|
16
|
+
*/
|
|
17
|
+
private _patch;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/google-genai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAC7G,OAAO,EACL,mBAAmB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAmB1E,KAAK,iCAAiC,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAEpF;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,mBAAmB,CAAC,iCAAiC,CAAC;gBACvF,MAAM,GAAE,iCAAsC;IAIjE;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAsB9C;;OAEG;IACH,OAAO,CAAC,MAAM;CAqCf"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';
|
|
2
|
+
interface GraphqlOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Do not create spans for resolvers.
|
|
5
|
+
*
|
|
6
|
+
* Defaults to true.
|
|
7
|
+
*/
|
|
8
|
+
ignoreResolveSpans?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Don't create spans for the execution of the default resolver on object properties.
|
|
11
|
+
*
|
|
12
|
+
* When a resolver function is not defined on the schema for a field, graphql will
|
|
13
|
+
* use the default resolver which just looks for a property with that name on the object.
|
|
14
|
+
* If the property is not a function, it's not very interesting to trace.
|
|
15
|
+
* This option can reduce noise and number of spans created.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to true.
|
|
18
|
+
*/
|
|
19
|
+
ignoreTrivialResolveSpans?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.
|
|
22
|
+
* Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.
|
|
23
|
+
*
|
|
24
|
+
* Defaults to true.
|
|
25
|
+
*/
|
|
26
|
+
useOperationNameForRootSpan?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const instrumentGraphql: ((options: GraphqlOptions) => GraphQLInstrumentation) & {
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.
|
|
33
|
+
*
|
|
34
|
+
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).
|
|
35
|
+
*
|
|
36
|
+
* @param {GraphqlOptions} options Configuration options for the GraphQL integration.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```javascript
|
|
40
|
+
* const Sentry = require('@sentry/node');
|
|
41
|
+
*
|
|
42
|
+
* Sentry.init({
|
|
43
|
+
* integrations: [Sentry.graphqlIntegration()],
|
|
44
|
+
* });
|
|
45
|
+
*/
|
|
46
|
+
export declare const graphqlIntegration: (options?: GraphqlOptions | undefined) => import("@sentry/core").Integration;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=graphql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAMhF,UAAU,cAAc;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAID,eAAO,MAAM,iBAAiB;;CAwD7B,CAAC;AAcF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,8EAAyC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';
|
|
2
|
+
import type { Server } from './types';
|
|
3
|
+
export declare const instrumentHapi: ((options?: unknown) => HapiInstrumentation) & {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/).
|
|
8
|
+
*
|
|
9
|
+
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.
|
|
10
|
+
*
|
|
11
|
+
* For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* const Sentry = require('@sentry/node');
|
|
16
|
+
*
|
|
17
|
+
* Sentry.init({
|
|
18
|
+
* integrations: [Sentry.hapiIntegration()],
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const hapiIntegration: () => import("@sentry/core").Integration;
|
|
23
|
+
export declare const hapiErrorPlugin: {
|
|
24
|
+
name: string;
|
|
25
|
+
version: string;
|
|
26
|
+
register: (serverArg: Record<any, any>) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Add a Hapi plugin to capture errors to Sentry.
|
|
30
|
+
*
|
|
31
|
+
* @param server The Hapi server to attach the error handler to
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```javascript
|
|
35
|
+
* const Sentry = require('@sentry/node');
|
|
36
|
+
* const Hapi = require('@hapi/hapi');
|
|
37
|
+
*
|
|
38
|
+
* const init = async () => {
|
|
39
|
+
* const server = Hapi.server();
|
|
40
|
+
*
|
|
41
|
+
* // all your routes here
|
|
42
|
+
*
|
|
43
|
+
* await Sentry.setupHapiErrorHandler(server);
|
|
44
|
+
*
|
|
45
|
+
* await server.start();
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function setupHapiErrorHandler(server: Server): Promise<void>;
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAgB1E,OAAO,KAAK,EAAyB,MAAM,EAAE,MAAM,SAAS,CAAC;AAI7D,eAAO,MAAM,cAAc;;CAA4E,CAAC;AAWxG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,0CAAsC,CAAC;AAenE,eAAO,MAAM,eAAe;;;0BAIW,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;CAmBtD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAczE"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type * as stream from 'stream';
|
|
2
|
+
interface Podium {
|
|
3
|
+
new (events?: Events[]): Podium;
|
|
4
|
+
new (events?: Events): Podium;
|
|
5
|
+
registerEvent(events: Events[]): void;
|
|
6
|
+
registerEvent(events: Events): void;
|
|
7
|
+
registerPodium?(podiums: Podium[]): void;
|
|
8
|
+
registerPodium?(podiums: Podium): void;
|
|
9
|
+
emit(criteria: string | {
|
|
10
|
+
name: string;
|
|
11
|
+
channel?: string | undefined;
|
|
12
|
+
tags?: string | string[] | undefined;
|
|
13
|
+
}, data: any, callback?: () => void): void;
|
|
14
|
+
on(criteria: string | Criteria, listener: Listener): void;
|
|
15
|
+
addListener(criteria: string | Criteria, listener: Listener): void;
|
|
16
|
+
once(criteria: string | Criteria, listener: Listener): void;
|
|
17
|
+
removeListener(name: string, listener: Listener): Podium;
|
|
18
|
+
removeAllListeners(name: string): Podium;
|
|
19
|
+
hasListeners(name: string): boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface Boom<Data = any> extends Error {
|
|
22
|
+
isBoom: boolean;
|
|
23
|
+
isServer: boolean;
|
|
24
|
+
message: string;
|
|
25
|
+
output: Output;
|
|
26
|
+
reformat: () => string;
|
|
27
|
+
isMissing?: boolean | undefined;
|
|
28
|
+
data: Data;
|
|
29
|
+
}
|
|
30
|
+
export interface Output {
|
|
31
|
+
statusCode: number;
|
|
32
|
+
headers: {
|
|
33
|
+
[index: string]: string;
|
|
34
|
+
};
|
|
35
|
+
payload: Payload;
|
|
36
|
+
}
|
|
37
|
+
export interface Payload {
|
|
38
|
+
statusCode: number;
|
|
39
|
+
error: string;
|
|
40
|
+
message: string;
|
|
41
|
+
attributes?: any;
|
|
42
|
+
}
|
|
43
|
+
export type Events = string | EventOptionsObject | Podium;
|
|
44
|
+
export interface EventOptionsObject {
|
|
45
|
+
name: string;
|
|
46
|
+
channels?: string | string[] | undefined;
|
|
47
|
+
clone?: boolean | undefined;
|
|
48
|
+
spread?: boolean | undefined;
|
|
49
|
+
tags?: boolean | undefined;
|
|
50
|
+
shared?: boolean | undefined;
|
|
51
|
+
}
|
|
52
|
+
export interface CriteriaObject {
|
|
53
|
+
name: string;
|
|
54
|
+
block?: boolean | number | undefined;
|
|
55
|
+
channels?: string | string[] | undefined;
|
|
56
|
+
clone?: boolean | undefined;
|
|
57
|
+
count?: number | undefined;
|
|
58
|
+
filter?: string | string[] | CriteriaFilterOptionsObject | undefined;
|
|
59
|
+
spread?: boolean | undefined;
|
|
60
|
+
tags?: boolean | undefined;
|
|
61
|
+
listener?: Listener | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface CriteriaFilterOptionsObject {
|
|
64
|
+
tags?: string | string[] | undefined;
|
|
65
|
+
all?: boolean | undefined;
|
|
66
|
+
}
|
|
67
|
+
export type Criteria = string | CriteriaObject;
|
|
68
|
+
export interface Listener {
|
|
69
|
+
(data: any, tags?: Tags, callback?: () => void): void;
|
|
70
|
+
}
|
|
71
|
+
export type Tags = {
|
|
72
|
+
[tag: string]: boolean;
|
|
73
|
+
};
|
|
74
|
+
interface UserCredentials {
|
|
75
|
+
}
|
|
76
|
+
interface AppCredentials {
|
|
77
|
+
}
|
|
78
|
+
interface AuthCredentials {
|
|
79
|
+
scope?: string[] | undefined;
|
|
80
|
+
user?: UserCredentials | undefined;
|
|
81
|
+
app?: AppCredentials | undefined;
|
|
82
|
+
}
|
|
83
|
+
interface RequestAuth {
|
|
84
|
+
artifacts: object;
|
|
85
|
+
credentials: AuthCredentials;
|
|
86
|
+
error: Error;
|
|
87
|
+
isAuthenticated: boolean;
|
|
88
|
+
isAuthorized: boolean;
|
|
89
|
+
mode: string;
|
|
90
|
+
strategy: string;
|
|
91
|
+
}
|
|
92
|
+
interface RequestEvents extends Podium {
|
|
93
|
+
on(criteria: 'peek', listener: PeekListener): void;
|
|
94
|
+
on(criteria: 'finish' | 'disconnect', listener: (data: undefined) => void): void;
|
|
95
|
+
once(criteria: 'peek', listener: PeekListener): void;
|
|
96
|
+
once(criteria: 'finish' | 'disconnect', listener: (data: undefined) => void): void;
|
|
97
|
+
}
|
|
98
|
+
declare namespace Lifecycle {
|
|
99
|
+
type Method = (request: Request, h: ResponseToolkit, err?: Error) => ReturnValue;
|
|
100
|
+
type ReturnValue = ReturnValueTypes | Promise<ReturnValueTypes>;
|
|
101
|
+
type ReturnValueTypes = (null | string | number | boolean) | Buffer | (Error | Boom) | stream.Stream | (object | object[]) | symbol | ResponseToolkit;
|
|
102
|
+
type FailAction = 'error' | 'log' | 'ignore' | Method;
|
|
103
|
+
}
|
|
104
|
+
declare namespace Util {
|
|
105
|
+
interface Dictionary<T> {
|
|
106
|
+
[key: string]: T;
|
|
107
|
+
}
|
|
108
|
+
type HTTP_METHODS_PARTIAL_LOWERCASE = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options';
|
|
109
|
+
type HTTP_METHODS_PARTIAL = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | HTTP_METHODS_PARTIAL_LOWERCASE;
|
|
110
|
+
type HTTP_METHODS = 'HEAD' | 'head' | HTTP_METHODS_PARTIAL;
|
|
111
|
+
}
|
|
112
|
+
interface RequestRoute {
|
|
113
|
+
method: Util.HTTP_METHODS_PARTIAL;
|
|
114
|
+
path: string;
|
|
115
|
+
vhost?: string | string[] | undefined;
|
|
116
|
+
realm: any;
|
|
117
|
+
fingerprint: string;
|
|
118
|
+
auth: {
|
|
119
|
+
access(request: Request): boolean;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export interface Request extends Podium {
|
|
123
|
+
app: ApplicationState;
|
|
124
|
+
readonly auth: RequestAuth;
|
|
125
|
+
events: RequestEvents;
|
|
126
|
+
readonly headers: Util.Dictionary<string>;
|
|
127
|
+
readonly path: string;
|
|
128
|
+
response: ResponseObject | Boom | null;
|
|
129
|
+
readonly route: RequestRoute;
|
|
130
|
+
readonly url: URL;
|
|
131
|
+
}
|
|
132
|
+
interface ResponseObjectHeaderOptions {
|
|
133
|
+
append?: boolean | undefined;
|
|
134
|
+
separator?: string | undefined;
|
|
135
|
+
override?: boolean | undefined;
|
|
136
|
+
duplicate?: boolean | undefined;
|
|
137
|
+
}
|
|
138
|
+
export interface ResponseObject extends Podium {
|
|
139
|
+
readonly statusCode: number;
|
|
140
|
+
header(name: string, value: string, options?: ResponseObjectHeaderOptions): ResponseObject;
|
|
141
|
+
}
|
|
142
|
+
interface ResponseToolkit {
|
|
143
|
+
readonly continue: symbol;
|
|
144
|
+
}
|
|
145
|
+
export interface RequestEvent {
|
|
146
|
+
timestamp: string;
|
|
147
|
+
tags: string[];
|
|
148
|
+
channel: 'internal' | 'app' | 'error';
|
|
149
|
+
data: object;
|
|
150
|
+
error: object;
|
|
151
|
+
}
|
|
152
|
+
interface ServerEvents {
|
|
153
|
+
on(criteria: any, listener: any): void;
|
|
154
|
+
}
|
|
155
|
+
export type Server = Record<string, any> & {
|
|
156
|
+
events: ServerEvents;
|
|
157
|
+
register: any;
|
|
158
|
+
ext(event: any, method: Lifecycle.Method, options?: Record<string, any>): void;
|
|
159
|
+
initialize(): Promise<void>;
|
|
160
|
+
start(): Promise<void>;
|
|
161
|
+
};
|
|
162
|
+
interface ApplicationState {
|
|
163
|
+
}
|
|
164
|
+
type PeekListener = (chunk: string, encoding: string) => void;
|
|
165
|
+
export {};
|
|
166
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hapi/types.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEtC,UAAU,MAAM;IACd,K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IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACpB,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IACzC,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,GAAG,CAAC;IACd,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC/E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,UAAU,gBAAgB;CAAG;AAE7B,KAAK,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const AttributeNames: {
|
|
2
|
+
readonly HONO_TYPE: "hono.type";
|
|
3
|
+
readonly HONO_NAME: "hono.name";
|
|
4
|
+
};
|
|
5
|
+
export type AttributeNames = (typeof AttributeNames)[keyof typeof AttributeNames];
|
|
6
|
+
export declare const HonoTypes: {
|
|
7
|
+
readonly MIDDLEWARE: "middleware";
|
|
8
|
+
readonly REQUEST_HANDLER: "request_handler";
|
|
9
|
+
};
|
|
10
|
+
export type HonoTypes = (typeof HonoTypes)[keyof typeof HonoTypes];
|
|
11
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hono/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HonoInstrumentation } from './instrumentation';
|
|
2
|
+
import type { Context, MiddlewareHandlerInterface } from './types';
|
|
3
|
+
export declare const instrumentHono: ((options?: unknown) => HonoInstrumentation) & {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Adds Sentry tracing instrumentation for [Hono](https://hono.dev/).
|
|
8
|
+
*
|
|
9
|
+
* If you also want to capture errors, you need to call `setupHonoErrorHandler(app)` after you set up your Hono server.
|
|
10
|
+
*
|
|
11
|
+
* For more information, see the [hono documentation](https://docs.sentry.io/platforms/javascript/guides/hono/).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* const Sentry = require('@sentry/node');
|
|
16
|
+
*
|
|
17
|
+
* Sentry.init({
|
|
18
|
+
* integrations: [Sentry.honoIntegration()],
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const honoIntegration: () => import("@sentry/core").Integration;
|
|
23
|
+
interface HonoHandlerOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Callback method deciding whether error should be captured and sent to Sentry
|
|
26
|
+
* @param error Captured Hono error
|
|
27
|
+
*/
|
|
28
|
+
shouldHandleError: (context: Context) => boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Add a Hono error handler to capture errors to Sentry.
|
|
32
|
+
*
|
|
33
|
+
* @param app The Hono instances
|
|
34
|
+
* @param options Configuration options for the handler
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```javascript
|
|
38
|
+
* const Sentry = require('@sentry/node');
|
|
39
|
+
* const { Hono } = require("hono");
|
|
40
|
+
*
|
|
41
|
+
* const app = new Hono();
|
|
42
|
+
*
|
|
43
|
+
* Sentry.setupHonoErrorHandler(app);
|
|
44
|
+
*
|
|
45
|
+
* // Add your routes, etc.
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function setupHonoErrorHandler(app: {
|
|
49
|
+
use: MiddlewareHandlerInterface;
|
|
50
|
+
}, options?: Partial<HonoHandlerOptions>): void;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hono/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAqB,0BAA0B,EAAQ,MAAM,SAAS,CAAC;AAiC5F,eAAO,MAAM,cAAc;;CAQ1B,CAAC;AAWF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,0CAAsC,CAAC;AAEnE,UAAU,kBAAkB;IAC1B;;;OAGG;IACH,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CAClD;AA+BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE;IAAE,GAAG,EAAE,0BAA0B,CAAA;CAAE,EACxC,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACpC,IAAI,CAIN"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Span } from '@opentelemetry/api';
|
|
2
|
+
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
3
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
4
|
+
export interface HonoResponseHookFunction {
|
|
5
|
+
(span: Span): void;
|
|
6
|
+
}
|
|
7
|
+
export interface HonoInstrumentationConfig extends InstrumentationConfig {
|
|
8
|
+
/** Function for adding custom span attributes from the response */
|
|
9
|
+
responseHook?: HonoResponseHookFunction;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Hono instrumentation for OpenTelemetry
|
|
13
|
+
*/
|
|
14
|
+
export declare class HonoInstrumentation extends InstrumentationBase<HonoInstrumentationConfig> {
|
|
15
|
+
constructor(config?: HonoInstrumentationConfig);
|
|
16
|
+
/**
|
|
17
|
+
* Initialize the instrumentation.
|
|
18
|
+
*/
|
|
19
|
+
init(): InstrumentationNodeModuleDefinition[];
|
|
20
|
+
/**
|
|
21
|
+
* Patches the module exports to instrument Hono.
|
|
22
|
+
*/
|
|
23
|
+
private _patch;
|
|
24
|
+
/**
|
|
25
|
+
* Patches the route handler to instrument it.
|
|
26
|
+
*/
|
|
27
|
+
private _patchHandler;
|
|
28
|
+
/**
|
|
29
|
+
* Patches the 'on' handler to instrument it.
|
|
30
|
+
*/
|
|
31
|
+
private _patchOnHandler;
|
|
32
|
+
/**
|
|
33
|
+
* Patches the middleware handler to instrument it.
|
|
34
|
+
*/
|
|
35
|
+
private _patchMiddlewareHandler;
|
|
36
|
+
/**
|
|
37
|
+
* Wraps a handler or middleware handler to apply instrumentation.
|
|
38
|
+
*/
|
|
39
|
+
private _wrapHandler;
|
|
40
|
+
/**
|
|
41
|
+
* Safely executes a function and handles errors.
|
|
42
|
+
*/
|
|
43
|
+
private _safeExecute;
|
|
44
|
+
/**
|
|
45
|
+
* Determines the handler type based on the result.
|
|
46
|
+
* @param result
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
private _determineHandlerType;
|
|
50
|
+
/**
|
|
51
|
+
* Handles errors by setting the span status and recording the exception.
|
|
52
|
+
*/
|
|
53
|
+
private _handleError;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hono/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAkB1G,MAAM,WAAW,wBAAwB;IACvC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB;IACtE,mEAAmE;IACnE,YAAY,CAAC,EAAE,wBAAwB,CAAC;CACzC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,mBAAmB,CAAC,yBAAyB,CAAC;gBAClE,MAAM,GAAE,yBAA8B;IAIzD;;OAEG;IACI,IAAI,IAAI,mCAAmC,EAAE;IAMpD;;OAEG;IACH,OAAO,CAAC,MAAM;IA8Bd;;OAEG;IACH,OAAO,CAAC,aAAa;IA2BrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA2B/B;;OAEG;IACH,OAAO,CAAC,YAAY;IA8CpB;;OAEG;IAEH,OAAO,CAAC,YAAY;IAoBpB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAI7B;;OAEG;IACH,OAAO,CAAC,YAAY;CASrB"}
|