@depup/dd-trace 5.97.0-depup.0 → 6.4.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-3rdparty.csv +89 -104
- package/README.md +9 -3
- package/changes.json +8 -3
- package/ci/init.js +25 -5
- package/ci/vitest-no-worker-init-setup.mjs +430 -0
- package/ext/exporters.js +1 -0
- package/ext/tags.js +3 -0
- package/index.d.ts +315 -244
- package/index.electron.js +3 -0
- package/initialize.mjs +9 -8
- package/loader-hook.mjs +154 -47
- package/package.json +118 -78
- package/packages/datadog-core/src/storage.js +47 -48
- package/packages/datadog-esbuild/index.js +32 -1
- package/packages/datadog-esbuild/src/utils.js +46 -3
- package/packages/datadog-instrumentations/src/aerospike.js +3 -3
- package/packages/datadog-instrumentations/src/ai.js +131 -76
- package/packages/datadog-instrumentations/src/amqplib.js +6 -7
- package/packages/datadog-instrumentations/src/anthropic.js +10 -10
- package/packages/datadog-instrumentations/src/apollo-server-core.js +3 -3
- package/packages/datadog-instrumentations/src/apollo-server.js +10 -18
- package/packages/datadog-instrumentations/src/avsc.js +6 -6
- package/packages/datadog-instrumentations/src/aws-durable-execution-sdk-js-context-methods.js +18 -0
- package/packages/datadog-instrumentations/src/aws-durable-execution-sdk-js.js +111 -0
- package/packages/datadog-instrumentations/src/aws-sdk.js +172 -72
- package/packages/datadog-instrumentations/src/azure-cosmos.js +7 -0
- package/packages/datadog-instrumentations/src/azure-durable-functions.js +8 -8
- package/packages/datadog-instrumentations/src/azure-functions.js +3 -0
- package/packages/datadog-instrumentations/src/bluebird.js +2 -2
- package/packages/datadog-instrumentations/src/body-parser.js +5 -2
- package/packages/datadog-instrumentations/src/cassandra-driver.js +12 -9
- package/packages/datadog-instrumentations/src/child_process.js +15 -15
- package/packages/datadog-instrumentations/src/claude-agent-sdk.js +587 -0
- package/packages/datadog-instrumentations/src/confluentinc-kafka-javascript.js +41 -24
- package/packages/datadog-instrumentations/src/connect.js +14 -12
- package/packages/datadog-instrumentations/src/cookie-parser.js +5 -4
- package/packages/datadog-instrumentations/src/cookie.js +9 -3
- package/packages/datadog-instrumentations/src/couchbase.js +73 -238
- package/packages/datadog-instrumentations/src/crypto.js +49 -4
- package/packages/datadog-instrumentations/src/cucumber-worker-threads.js +19 -0
- package/packages/datadog-instrumentations/src/cucumber.js +747 -187
- package/packages/datadog-instrumentations/src/cypress-config.js +164 -56
- package/packages/datadog-instrumentations/src/cypress.js +5 -3
- package/packages/datadog-instrumentations/src/dns.js +60 -59
- package/packages/datadog-instrumentations/src/elasticsearch.js +9 -12
- package/packages/datadog-instrumentations/src/electron/preload.js +42 -0
- package/packages/datadog-instrumentations/src/electron.js +240 -0
- package/packages/datadog-instrumentations/src/express-mongo-sanitize.js +11 -9
- package/packages/datadog-instrumentations/src/express-session.js +14 -13
- package/packages/datadog-instrumentations/src/express.js +52 -30
- package/packages/datadog-instrumentations/src/fastify.js +169 -86
- package/packages/datadog-instrumentations/src/fetch.js +5 -5
- package/packages/datadog-instrumentations/src/fs.js +22 -20
- package/packages/datadog-instrumentations/src/google-cloud-pubsub.js +5 -7
- package/packages/datadog-instrumentations/src/google-genai.js +4 -4
- package/packages/datadog-instrumentations/src/graphql.js +26 -362
- package/packages/datadog-instrumentations/src/grpc/client.js +48 -32
- package/packages/datadog-instrumentations/src/grpc/server.js +20 -2
- package/packages/datadog-instrumentations/src/hapi.js +2 -2
- package/packages/datadog-instrumentations/src/helpers/callback-instrumentor.js +74 -0
- package/packages/datadog-instrumentations/src/helpers/check-require-cache.js +85 -9
- package/packages/datadog-instrumentations/src/helpers/hook.js +4 -1
- package/packages/datadog-instrumentations/src/helpers/hooks.js +12 -0
- package/packages/datadog-instrumentations/src/helpers/instrument.js +36 -3
- package/packages/datadog-instrumentations/src/helpers/kafka.js +58 -0
- package/packages/datadog-instrumentations/src/helpers/optional-peer-bundler.js +65 -0
- package/packages/datadog-instrumentations/src/helpers/promise-instrumentor.js +42 -0
- package/packages/datadog-instrumentations/src/helpers/promise.js +2 -2
- package/packages/datadog-instrumentations/src/helpers/register.js +7 -5
- package/packages/datadog-instrumentations/src/helpers/require-optional-peer.js +17 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +13 -5
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +24 -7
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/ai.js +6 -6
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/aws-durable-execution-sdk-js.js +31 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/azure-cosmos.js +50 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/claude-agent-sdk.js +17 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/graphql.js +201 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +7 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langgraph.js +4 -2
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/mercurius.js +31 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/modelcontextprotocol-sdk.js +35 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/playwright.js +85 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.mjs +18 -2
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +49 -224
- package/packages/datadog-instrumentations/src/helpers/router-helper.js +8 -8
- package/packages/datadog-instrumentations/src/hono.js +71 -9
- package/packages/datadog-instrumentations/src/http/client.js +48 -24
- package/packages/datadog-instrumentations/src/http/server.js +75 -29
- package/packages/datadog-instrumentations/src/http2/client.js +15 -12
- package/packages/datadog-instrumentations/src/http2/server.js +156 -23
- package/packages/datadog-instrumentations/src/ioredis.js +17 -14
- package/packages/datadog-instrumentations/src/iovalkey.js +1 -2
- package/packages/datadog-instrumentations/src/jest/bail-reporter.js +42 -0
- package/packages/datadog-instrumentations/src/jest/coverage-backfill.js +163 -0
- package/packages/datadog-instrumentations/src/jest.js +1783 -401
- package/packages/datadog-instrumentations/src/kafkajs.js +284 -170
- package/packages/datadog-instrumentations/src/knex.js +17 -17
- package/packages/datadog-instrumentations/src/koa.js +15 -14
- package/packages/datadog-instrumentations/src/ldapjs.js +5 -5
- package/packages/datadog-instrumentations/src/light-my-request.js +2 -2
- package/packages/datadog-instrumentations/src/limitd-client.js +4 -4
- package/packages/datadog-instrumentations/src/lodash.js +4 -4
- package/packages/datadog-instrumentations/src/mariadb.js +18 -16
- package/packages/datadog-instrumentations/src/memcached.js +4 -3
- package/packages/datadog-instrumentations/src/mercurius.js +11 -0
- package/packages/datadog-instrumentations/src/microgateway-core.js +2 -2
- package/packages/datadog-instrumentations/src/mocha/common.js +7 -4
- package/packages/datadog-instrumentations/src/mocha/main.js +557 -118
- package/packages/datadog-instrumentations/src/mocha/utils.js +531 -131
- package/packages/datadog-instrumentations/src/mocha/worker.js +27 -9
- package/packages/datadog-instrumentations/src/modelcontextprotocol-sdk.js +254 -0
- package/packages/datadog-instrumentations/src/mongodb-core.js +43 -31
- package/packages/datadog-instrumentations/src/mongodb.js +79 -5
- package/packages/datadog-instrumentations/src/mongoose.js +43 -34
- package/packages/datadog-instrumentations/src/mquery.js +5 -5
- package/packages/datadog-instrumentations/src/multer.js +5 -4
- package/packages/datadog-instrumentations/src/mysql.js +17 -17
- package/packages/datadog-instrumentations/src/mysql2.js +39 -5
- package/packages/datadog-instrumentations/src/nats.js +182 -0
- package/packages/datadog-instrumentations/src/net.js +19 -11
- package/packages/datadog-instrumentations/src/next.js +44 -10
- package/packages/datadog-instrumentations/src/nyc.js +43 -6
- package/packages/datadog-instrumentations/src/openai.js +124 -38
- package/packages/datadog-instrumentations/src/oracledb.js +12 -7
- package/packages/datadog-instrumentations/src/otel-sdk-trace.js +27 -6
- package/packages/datadog-instrumentations/src/passport-utils.js +5 -5
- package/packages/datadog-instrumentations/src/path-to-regexp.js +44 -0
- package/packages/datadog-instrumentations/src/pg.js +58 -25
- package/packages/datadog-instrumentations/src/pino.js +25 -41
- package/packages/datadog-instrumentations/src/playwright-browser-scripts.js +27 -0
- package/packages/datadog-instrumentations/src/playwright.js +1086 -350
- package/packages/datadog-instrumentations/src/protobufjs.js +16 -16
- package/packages/datadog-instrumentations/src/redis.js +28 -15
- package/packages/datadog-instrumentations/src/restify.js +6 -5
- package/packages/datadog-instrumentations/src/router.js +243 -87
- package/packages/datadog-instrumentations/src/selenium.js +1 -2
- package/packages/datadog-instrumentations/src/stripe.js +47 -33
- package/packages/datadog-instrumentations/src/tedious.js +28 -0
- package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +1297 -0
- package/packages/datadog-instrumentations/src/vitest-main.js +1592 -0
- package/packages/datadog-instrumentations/src/vitest-util.js +251 -0
- package/packages/datadog-instrumentations/src/vitest-worker.js +822 -0
- package/packages/datadog-instrumentations/src/vitest.js +11 -1262
- package/packages/datadog-instrumentations/src/winston.js +4 -4
- package/packages/datadog-instrumentations/src/ws.js +7 -7
- package/packages/datadog-instrumentations/src/zlib.js +29 -0
- package/packages/datadog-plugin-ai/src/index.js +1 -1
- package/packages/datadog-plugin-ai/src/tracing.js +66 -3
- package/packages/datadog-plugin-ai/src/utils.js +17 -4
- package/packages/datadog-plugin-apollo/src/gateway/request.js +1 -21
- package/packages/datadog-plugin-avsc/src/schema_iterator.js +3 -3
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/checkpoint.js +31 -0
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/client.js +55 -0
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/context.js +123 -0
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js +129 -0
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/index.js +19 -0
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/trace-checkpoint.js +224 -0
- package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/util.js +79 -0
- package/packages/datadog-plugin-aws-sdk/src/base.js +86 -50
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/tracing.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/utils.js +218 -4
- package/packages/datadog-plugin-aws-sdk/src/services/cloudwatchlogs.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +2 -1
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +59 -14
- package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +174 -75
- package/packages/datadog-plugin-aws-sdk/src/services/lambda.js +34 -23
- package/packages/datadog-plugin-aws-sdk/src/services/redshift.js +2 -1
- package/packages/datadog-plugin-aws-sdk/src/services/s3.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/sns.js +26 -26
- package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +187 -101
- package/packages/datadog-plugin-aws-sdk/src/services/stepfunctions.js +20 -18
- package/packages/datadog-plugin-azure-cosmos/src/index.js +144 -0
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +8 -15
- package/packages/datadog-plugin-azure-functions/src/index.js +7 -3
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +5 -10
- package/packages/datadog-plugin-bullmq/src/consumer.js +5 -4
- package/packages/datadog-plugin-bullmq/src/filter.js +35 -0
- package/packages/datadog-plugin-bullmq/src/producer.js +121 -33
- package/packages/datadog-plugin-bunyan/src/index.js +28 -0
- package/packages/datadog-plugin-child_process/src/index.js +13 -2
- package/packages/datadog-plugin-child_process/src/scrub-cmd-params.js +6 -6
- package/packages/datadog-plugin-claude-agent-sdk/src/index.js +31 -0
- package/packages/datadog-plugin-claude-agent-sdk/src/tracing.js +107 -0
- package/packages/datadog-plugin-claude-agent-sdk/src/util.js +15 -0
- package/packages/datadog-plugin-couchbase/src/index.js +58 -52
- package/packages/datadog-plugin-cucumber/src/index.js +46 -28
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +961 -92
- package/packages/datadog-plugin-cypress/src/index.js +104 -2
- package/packages/datadog-plugin-cypress/src/plugin.js +6 -14
- package/packages/datadog-plugin-cypress/src/source-map-utils.js +48 -1
- package/packages/datadog-plugin-cypress/src/support.js +180 -25
- package/packages/datadog-plugin-dd-trace-api/src/index.js +1 -1
- package/packages/datadog-plugin-dns/src/lookup.js +8 -6
- package/packages/datadog-plugin-elasticsearch/src/index.js +28 -8
- package/packages/datadog-plugin-electron/src/index.js +17 -0
- package/packages/datadog-plugin-electron/src/ipc.js +143 -0
- package/packages/datadog-plugin-electron/src/net.js +82 -0
- package/packages/datadog-plugin-express/src/code_origin.js +1 -1
- package/packages/datadog-plugin-fastify/src/code_origin.js +1 -1
- package/packages/datadog-plugin-fs/src/index.js +2 -1
- package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +2 -5
- package/packages/datadog-plugin-google-cloud-pubsub/src/producer.js +27 -18
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +5 -8
- package/packages/datadog-plugin-graphql/src/execute.js +706 -34
- package/packages/datadog-plugin-graphql/src/index.js +43 -9
- package/packages/datadog-plugin-graphql/src/parse.js +45 -4
- package/packages/datadog-plugin-graphql/src/request.js +135 -0
- package/packages/datadog-plugin-graphql/src/tools/signature.js +32 -7
- package/packages/datadog-plugin-graphql/src/tools/transforms.js +118 -100
- package/packages/datadog-plugin-graphql/src/utils.js +261 -3
- package/packages/datadog-plugin-graphql/src/validate.js +53 -7
- package/packages/datadog-plugin-grpc/src/client.js +7 -8
- package/packages/datadog-plugin-grpc/src/server.js +1 -1
- package/packages/datadog-plugin-grpc/src/util.js +57 -22
- package/packages/datadog-plugin-http/src/client.js +12 -14
- package/packages/datadog-plugin-http/src/index.js +6 -8
- package/packages/datadog-plugin-http/src/server.js +63 -20
- package/packages/datadog-plugin-http2/src/client.js +6 -3
- package/packages/datadog-plugin-http2/src/server.js +48 -8
- package/packages/datadog-plugin-jest/src/index.js +133 -67
- package/packages/datadog-plugin-jest/src/util.js +37 -16
- package/packages/datadog-plugin-kafkajs/src/batch-consumer.js +1 -1
- package/packages/datadog-plugin-kafkajs/src/consumer.js +2 -9
- package/packages/datadog-plugin-kafkajs/src/producer.js +37 -8
- package/packages/datadog-plugin-langgraph/src/stream.js +1 -1
- package/packages/datadog-plugin-memcached/src/index.js +1 -1
- package/packages/datadog-plugin-mocha/src/index.js +66 -20
- package/packages/datadog-plugin-modelcontextprotocol-sdk/src/index.js +24 -0
- package/packages/datadog-plugin-modelcontextprotocol-sdk/src/tracing.js +173 -0
- package/packages/datadog-plugin-modelcontextprotocol-sdk/src/utils.js +30 -0
- package/packages/datadog-plugin-mongodb-core/src/bulk-write.js +43 -0
- package/packages/datadog-plugin-mongodb-core/src/index.js +8 -206
- package/packages/datadog-plugin-mongodb-core/src/query.js +452 -0
- package/packages/datadog-plugin-mysql/src/index.js +9 -4
- package/packages/datadog-plugin-nats/src/consumer.js +43 -0
- package/packages/datadog-plugin-nats/src/index.js +20 -0
- package/packages/datadog-plugin-nats/src/producer.js +62 -0
- package/packages/datadog-plugin-nats/src/util.js +33 -0
- package/packages/datadog-plugin-next/src/index.js +12 -4
- package/packages/datadog-plugin-openai/src/services.js +4 -3
- package/packages/datadog-plugin-openai/src/tracing.js +27 -25
- package/packages/datadog-plugin-oracledb/src/index.js +13 -2
- package/packages/datadog-plugin-pg/src/index.js +13 -3
- package/packages/datadog-plugin-pino/src/index.js +42 -0
- package/packages/datadog-plugin-playwright/src/index.js +21 -11
- package/packages/datadog-plugin-protobufjs/src/schema_iterator.js +3 -3
- package/packages/datadog-plugin-redis/src/index.js +54 -25
- package/packages/datadog-plugin-rhea/src/producer.js +1 -1
- package/packages/datadog-plugin-router/src/index.js +46 -44
- package/packages/datadog-plugin-selenium/src/index.js +1 -1
- package/packages/datadog-plugin-tedious/src/index.js +1 -1
- package/packages/datadog-plugin-undici/src/index.js +24 -2
- package/packages/datadog-plugin-vitest/src/index.js +160 -90
- package/packages/datadog-plugin-winston/src/index.js +30 -0
- package/packages/datadog-plugin-ws/src/close.js +3 -1
- package/packages/datadog-plugin-ws/src/producer.js +2 -0
- package/packages/datadog-plugin-ws/src/receiver.js +2 -1
- package/packages/datadog-shimmer/src/shimmer.js +101 -39
- package/packages/datadog-webpack/index.js +17 -1
- package/packages/datadog-webpack/src/optional-peer-loader.js +17 -0
- package/packages/dd-trace/index.electron.js +3 -0
- package/packages/dd-trace/index.js +2 -36
- package/packages/dd-trace/src/aiguard/channels.js +7 -0
- package/packages/dd-trace/src/aiguard/index.js +16 -34
- package/packages/dd-trace/src/aiguard/integrations/evaluate.js +46 -0
- package/packages/dd-trace/src/aiguard/integrations/index.js +34 -0
- package/packages/dd-trace/src/aiguard/integrations/openai.js +80 -0
- package/packages/dd-trace/src/aiguard/integrations/vercel-ai.js +92 -0
- package/packages/dd-trace/src/aiguard/messages/openai.js +382 -0
- package/packages/{datadog-instrumentations/src/helpers/ai-messages.js → dd-trace/src/aiguard/messages/vercel-ai.js} +30 -27
- package/packages/dd-trace/src/aiguard/sdk.js +147 -54
- package/packages/dd-trace/src/aiguard/tags.js +26 -10
- package/packages/dd-trace/src/appsec/api_security/index.js +55 -0
- package/packages/dd-trace/src/appsec/api_security/sampler.js +147 -0
- package/packages/dd-trace/src/appsec/blocked_templates.js +4 -3
- package/packages/dd-trace/src/appsec/blocking.js +82 -42
- package/packages/dd-trace/src/appsec/channels.js +5 -1
- package/packages/dd-trace/src/appsec/downstream_requests.js +116 -62
- package/packages/dd-trace/src/appsec/graphql.js +20 -17
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-password-rules.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-secret-rules.js +81 -81
- package/packages/dd-trace/src/appsec/iast/analyzers/nosql-injection-mongodb-analyzer.js +23 -23
- package/packages/dd-trace/src/appsec/iast/index.js +3 -2
- package/packages/dd-trace/src/appsec/iast/security-controls/index.js +4 -4
- package/packages/dd-trace/src/appsec/iast/taint-tracking/plugins/kafka.js +2 -2
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +4 -4
- package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +2 -2
- package/packages/dd-trace/src/appsec/iast/telemetry/index.js +2 -1
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/ldap-sensitive-analyzer.js +54 -12
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/url-sensitive-analyzer.js +5 -1
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-handler.js +31 -4
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/index.js +1 -3
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/utils.js +83 -48
- package/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +1 -1
- package/packages/dd-trace/src/appsec/index.js +65 -47
- package/packages/dd-trace/src/appsec/lambda.js +135 -0
- package/packages/dd-trace/src/appsec/rasp/command_injection.js +4 -5
- package/packages/dd-trace/src/appsec/rasp/lfi.js +8 -4
- package/packages/dd-trace/src/appsec/rasp/sql_injection.js +5 -10
- package/packages/dd-trace/src/appsec/rasp/ssrf.js +26 -18
- package/packages/dd-trace/src/appsec/recommended.json +2438 -13
- package/packages/dd-trace/src/appsec/reporter.js +87 -28
- package/packages/dd-trace/src/appsec/rule_manager.js +4 -2
- package/packages/dd-trace/src/appsec/sdk/set_user.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/track_event.js +5 -5
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +7 -11
- package/packages/dd-trace/src/appsec/sdk/utils.js +5 -3
- package/packages/dd-trace/src/appsec/store.js +50 -0
- package/packages/dd-trace/src/appsec/telemetry/api_security.js +34 -0
- package/packages/dd-trace/src/appsec/telemetry/index.js +27 -1
- package/packages/dd-trace/src/appsec/user_tracking.js +5 -4
- package/packages/dd-trace/src/appsec/waf/index.js +19 -9
- package/packages/dd-trace/src/appsec/waf/waf_context_wrapper.js +35 -20
- package/packages/dd-trace/src/appsec/waf/waf_manager.js +1 -1
- package/packages/dd-trace/src/azure_metadata.js +17 -6
- package/packages/dd-trace/src/baggage.js +32 -13
- package/packages/dd-trace/src/bootstrap.js +39 -0
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +30 -5
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +122 -24
- package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +22 -7
- package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +5 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js +6 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +148 -25
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +3 -4
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +28 -10
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +22 -0
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +105 -22
- package/packages/dd-trace/src/ci-visibility/lage.js +2 -1
- package/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +4 -5
- package/packages/dd-trace/src/ci-visibility/requests/fs-cache.js +4 -5
- package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +73 -55
- package/packages/dd-trace/src/ci-visibility/requests/request.js +14 -50
- package/packages/dd-trace/src/ci-visibility/requests/upload-coverage-report.js +4 -4
- package/packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js +156 -0
- package/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js +5 -3
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +24 -6
- package/packages/dd-trace/src/ci-visibility/test-optimization-cache.js +70 -6
- package/packages/dd-trace/src/ci-visibility/test-optimization-http-cache-schema.js +128 -0
- package/packages/dd-trace/src/ci-visibility/test-optimization-http-cache.js +291 -0
- package/packages/dd-trace/src/config/config-types.d.ts +8 -6
- package/packages/dd-trace/src/config/defaults.js +71 -44
- package/packages/dd-trace/src/config/generated-config-types.d.ts +676 -131
- package/packages/dd-trace/src/config/git_properties.js +2 -2
- package/packages/dd-trace/src/config/helper.js +139 -33
- package/packages/dd-trace/src/config/index.js +117 -131
- package/packages/dd-trace/src/config/major-overrides.js +100 -0
- package/packages/dd-trace/src/config/normalize-service.js +31 -0
- package/packages/dd-trace/src/config/parsers.js +138 -10
- package/packages/dd-trace/src/config/remote_config.js +1 -1
- package/packages/dd-trace/src/config/supported-configurations.json +394 -203
- package/packages/dd-trace/src/constants.js +15 -0
- package/packages/dd-trace/src/crashtracking/crashtracker.js +18 -6
- package/packages/dd-trace/src/datastreams/checkpointer.js +6 -12
- package/packages/dd-trace/src/datastreams/context.js +4 -2
- package/packages/dd-trace/src/datastreams/encoding.js +39 -28
- package/packages/dd-trace/src/datastreams/index.js +2 -1
- package/packages/dd-trace/src/datastreams/manager.js +1 -1
- package/packages/dd-trace/src/datastreams/pathway.js +35 -30
- package/packages/dd-trace/src/datastreams/processor.js +31 -22
- package/packages/dd-trace/src/datastreams/size.js +6 -2
- package/packages/dd-trace/src/datastreams/writer.js +15 -6
- package/packages/dd-trace/src/debugger/config.js +9 -4
- package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +49 -35
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +5 -8
- package/packages/dd-trace/src/debugger/devtools_client/config.js +3 -2
- package/packages/dd-trace/src/debugger/devtools_client/index.js +33 -71
- package/packages/dd-trace/src/debugger/devtools_client/probe_sampler.js +83 -0
- package/packages/dd-trace/src/debugger/devtools_client/send.js +27 -6
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/collector.js +2 -2
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/processor.js +5 -2
- package/packages/dd-trace/src/debugger/devtools_client/snapshot-pruner.js +1 -0
- package/packages/dd-trace/src/debugger/devtools_client/source-maps.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/state.js +3 -1
- package/packages/dd-trace/src/debugger/index.js +13 -9
- package/packages/dd-trace/src/debugger/probe_sampler.js +112 -0
- package/packages/dd-trace/src/debugger/probe_sampler_constants.js +19 -0
- package/packages/dd-trace/src/dogstatsd.js +34 -28
- package/packages/dd-trace/src/encode/0.4.js +829 -268
- package/packages/dd-trace/src/encode/0.5.js +158 -22
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +141 -65
- package/packages/dd-trace/src/encode/agentless-json.js +12 -6
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +52 -15
- package/packages/dd-trace/src/encode/span-stats.js +19 -16
- package/packages/dd-trace/src/encode/tags-processors.js +30 -25
- package/packages/dd-trace/src/exporter.js +3 -1
- package/packages/dd-trace/src/exporters/agent/index.js +4 -5
- package/packages/dd-trace/src/exporters/agent/writer.js +1 -2
- package/packages/dd-trace/src/exporters/agentless/index.js +12 -13
- package/packages/dd-trace/src/exporters/agentless/intake.js +43 -0
- package/packages/dd-trace/src/exporters/agentless/writer.js +12 -11
- package/packages/dd-trace/src/exporters/common/agents.js +3 -1
- package/packages/dd-trace/src/exporters/common/buffering-exporter.js +3 -3
- package/packages/dd-trace/src/exporters/common/request.js +48 -28
- package/packages/dd-trace/src/exporters/common/retry.js +104 -0
- package/packages/dd-trace/src/exporters/common/url.js +34 -0
- package/packages/dd-trace/src/exporters/common/util.js +2 -2
- package/packages/dd-trace/src/exporters/common/writer.js +17 -1
- package/packages/dd-trace/src/exporters/electron/index.js +49 -0
- package/packages/dd-trace/src/exporters/span-stats/index.js +1 -2
- package/packages/dd-trace/src/exporters/span-stats/writer.js +1 -3
- package/packages/dd-trace/src/external-logger/src/index.js +2 -1
- package/packages/dd-trace/src/feature-registry.js +22 -0
- package/packages/dd-trace/src/git_metadata.js +68 -0
- package/packages/dd-trace/src/git_metadata_tagger.js +13 -5
- package/packages/dd-trace/src/guardrails/index.js +11 -6
- package/packages/dd-trace/src/guardrails/telemetry.js +40 -3
- package/packages/dd-trace/src/heap_snapshots.js +4 -4
- package/packages/dd-trace/src/id.js +46 -27
- package/packages/dd-trace/src/index.js +7 -8
- package/packages/dd-trace/src/lambda/handler-paths.js +52 -0
- package/packages/dd-trace/src/lambda/handler.js +2 -6
- package/packages/dd-trace/src/lambda/index.js +62 -14
- package/packages/dd-trace/src/lambda/runtime/patch.js +21 -46
- package/packages/dd-trace/src/llmobs/constants/tags.js +13 -0
- package/packages/dd-trace/src/llmobs/index.js +37 -7
- package/packages/dd-trace/src/llmobs/plugins/ai/ddTelemetry.js +403 -0
- package/packages/dd-trace/src/llmobs/plugins/ai/index.js +8 -395
- package/packages/dd-trace/src/llmobs/plugins/ai/util.js +119 -7
- package/packages/dd-trace/src/llmobs/plugins/ai/vercelTelemetry.js +363 -0
- package/packages/dd-trace/src/llmobs/plugins/{anthropic.js → anthropic/index.js} +32 -79
- package/packages/dd-trace/src/llmobs/plugins/anthropic/util.js +109 -0
- package/packages/dd-trace/src/llmobs/plugins/base.js +4 -4
- package/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js +89 -37
- package/packages/dd-trace/src/llmobs/plugins/claude-agent-sdk/index.js +270 -0
- package/packages/dd-trace/src/llmobs/plugins/claude-agent-sdk/utils.js +10 -0
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +5 -1
- package/packages/dd-trace/src/llmobs/plugins/genai/util.js +81 -16
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/chain.js +3 -2
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/chat_model.js +3 -2
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/embedding.js +2 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/index.js +1 -50
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/vectorstore.js +2 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +14 -8
- package/packages/dd-trace/src/llmobs/plugins/langchain/messages.js +76 -0
- package/packages/dd-trace/src/llmobs/plugins/langgraph/index.js +3 -28
- package/packages/dd-trace/src/llmobs/plugins/modelcontextprotocol-sdk/index.js +68 -0
- package/packages/dd-trace/src/llmobs/plugins/modelcontextprotocol-sdk/utils.js +57 -0
- package/packages/dd-trace/src/llmobs/plugins/openai/index.js +21 -51
- package/packages/dd-trace/src/llmobs/sdk.js +56 -35
- package/packages/dd-trace/src/llmobs/span_processor.js +90 -11
- package/packages/dd-trace/src/llmobs/tagger.js +129 -4
- package/packages/dd-trace/src/llmobs/telemetry.js +31 -1
- package/packages/dd-trace/src/llmobs/util.js +202 -9
- package/packages/dd-trace/src/llmobs/writers/base.js +11 -5
- package/packages/dd-trace/src/llmobs/writers/spans.js +1 -1
- package/packages/dd-trace/src/llmobs/writers/util.js +1 -2
- package/packages/dd-trace/src/log/index.js +19 -31
- package/packages/dd-trace/src/log/writer.js +3 -1
- package/packages/dd-trace/src/msgpack/chunk.js +430 -11
- package/packages/dd-trace/src/msgpack/index.js +101 -2
- package/packages/dd-trace/src/noop/proxy.js +5 -4
- package/packages/dd-trace/src/noop/span.js +3 -1
- package/packages/dd-trace/src/openfeature/encoding.js +70 -0
- package/packages/dd-trace/src/openfeature/eval-metrics-hook.js +103 -0
- package/packages/dd-trace/src/openfeature/flagging_provider.js +26 -1
- package/packages/dd-trace/src/openfeature/noop.js +40 -36
- package/packages/dd-trace/src/openfeature/register.js +46 -0
- package/packages/dd-trace/src/openfeature/remote_config.js +6 -1
- package/packages/dd-trace/src/openfeature/span-enrichment-hook.js +143 -0
- package/packages/dd-trace/src/openfeature/span-enrichment.js +149 -0
- package/packages/dd-trace/src/openfeature/writers/base.js +3 -11
- package/packages/dd-trace/src/openfeature/writers/exposures.js +82 -70
- package/packages/dd-trace/src/openfeature/writers/util.js +1 -2
- package/packages/dd-trace/src/opentelemetry/active-span-proxy.js +42 -0
- package/packages/dd-trace/src/opentelemetry/bridge-span-base.js +107 -0
- package/packages/dd-trace/src/opentelemetry/context_manager.js +27 -13
- package/packages/dd-trace/src/opentelemetry/logs/index.js +6 -6
- package/packages/dd-trace/src/opentelemetry/logs/otlp_http_log_exporter.js +3 -2
- package/packages/dd-trace/src/opentelemetry/metrics/index.js +61 -12
- package/packages/dd-trace/src/opentelemetry/metrics/instruments.js +28 -14
- package/packages/dd-trace/src/opentelemetry/metrics/meter.js +7 -10
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_http_metric_exporter.js +3 -2
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_exporter.js +40 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_transformer.js +169 -0
- package/packages/dd-trace/src/opentelemetry/metrics/periodic_metric_reader.js +99 -5
- package/packages/dd-trace/src/opentelemetry/metrics/time.js +19 -0
- package/packages/dd-trace/src/opentelemetry/otlp/common.proto +2 -2
- package/packages/dd-trace/src/opentelemetry/otlp/logs.proto +1 -1
- package/packages/dd-trace/src/opentelemetry/otlp/logs_service.proto +1 -1
- package/packages/dd-trace/src/opentelemetry/otlp/metrics.proto +1 -1
- package/packages/dd-trace/src/opentelemetry/otlp/metrics_service.proto +1 -1
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +56 -82
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_transformer_base.js +1 -2
- package/packages/dd-trace/src/opentelemetry/otlp/protobuf_loader.js +14 -2
- package/packages/dd-trace/src/opentelemetry/otlp/trace.proto +358 -0
- package/packages/dd-trace/src/opentelemetry/otlp/trace_service.proto +78 -0
- package/packages/dd-trace/src/opentelemetry/span-helpers.js +325 -0
- package/packages/dd-trace/src/opentelemetry/span.js +59 -109
- package/packages/dd-trace/src/opentelemetry/span_context.js +1 -0
- package/packages/dd-trace/src/opentelemetry/span_processor.js +7 -5
- package/packages/dd-trace/src/opentelemetry/trace/index.js +75 -0
- package/packages/dd-trace/src/opentelemetry/trace/otlp_http_trace_exporter.js +75 -0
- package/packages/dd-trace/src/opentelemetry/trace/otlp_transformer.js +375 -0
- package/packages/dd-trace/src/opentelemetry/tracer.js +20 -69
- package/packages/dd-trace/src/opentelemetry/tracer_provider.js +33 -17
- package/packages/dd-trace/src/opentracing/propagation/log.js +28 -8
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +278 -148
- package/packages/dd-trace/src/opentracing/propagation/text_map_dsm.js +11 -11
- package/packages/dd-trace/src/opentracing/propagation/tracestate.js +98 -32
- package/packages/dd-trace/src/opentracing/span.js +127 -73
- package/packages/dd-trace/src/opentracing/span_context.js +68 -3
- package/packages/dd-trace/src/opentracing/tracer.js +46 -19
- package/packages/dd-trace/src/payload-tagging/config/index.js +2 -2
- package/packages/dd-trace/src/plugin_manager.js +36 -14
- package/packages/dd-trace/src/plugins/apollo.js +3 -1
- package/packages/dd-trace/src/plugins/ci_plugin.js +387 -85
- package/packages/dd-trace/src/plugins/database.js +61 -18
- package/packages/dd-trace/src/plugins/index.js +14 -0
- package/packages/dd-trace/src/plugins/log_injection.js +56 -0
- package/packages/dd-trace/src/plugins/log_plugin.js +4 -44
- package/packages/dd-trace/src/plugins/outbound.js +1 -1
- package/packages/dd-trace/src/plugins/plugin.js +19 -28
- package/packages/dd-trace/src/plugins/storage.js +2 -2
- package/packages/dd-trace/src/plugins/tracing.js +70 -13
- package/packages/dd-trace/src/plugins/util/ci.js +127 -40
- package/packages/dd-trace/src/plugins/util/git-cache.js +23 -23
- package/packages/dd-trace/src/plugins/util/git.js +3 -1
- package/packages/dd-trace/src/plugins/util/http-otel-semantics.js +276 -0
- package/packages/dd-trace/src/plugins/util/llm.js +6 -1
- package/packages/dd-trace/src/plugins/util/stacktrace.js +2 -2
- package/packages/dd-trace/src/plugins/util/test.js +894 -65
- package/packages/dd-trace/src/plugins/util/url.js +71 -5
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +18 -16
- package/packages/dd-trace/src/plugins/util/web.js +116 -180
- package/packages/dd-trace/src/priority_sampler.js +12 -21
- package/packages/dd-trace/src/profiling/config.js +132 -212
- package/packages/dd-trace/src/profiling/constants.js +4 -7
- package/packages/dd-trace/src/profiling/exporter_cli.js +10 -10
- package/packages/dd-trace/src/profiling/exporters/agent.js +61 -28
- package/packages/dd-trace/src/profiling/exporters/event_serializer.js +45 -14
- package/packages/dd-trace/src/profiling/exporters/file.js +16 -5
- package/packages/dd-trace/src/profiling/oom.js +71 -0
- package/packages/dd-trace/src/profiling/profiler.js +84 -105
- package/packages/dd-trace/src/profiling/profilers/event_plugins/crypto.js +32 -0
- package/packages/dd-trace/src/profiling/profilers/event_plugins/zlib.js +19 -0
- package/packages/dd-trace/src/profiling/profilers/events.js +57 -13
- package/packages/dd-trace/src/profiling/profilers/space.js +27 -16
- package/packages/dd-trace/src/profiling/profilers/wall.js +49 -35
- package/packages/dd-trace/src/profiling/ssi-heuristics.js +3 -3
- package/packages/dd-trace/src/propagation-hash/index.js +1 -1
- package/packages/dd-trace/src/proxy.js +50 -36
- package/packages/dd-trace/src/rate_limiter.js +1 -1
- package/packages/dd-trace/src/remote_config/index.js +6 -5
- package/packages/dd-trace/src/remote_config/scheduler.js +1 -1
- package/packages/dd-trace/src/ritm.js +6 -3
- package/packages/dd-trace/src/runtime_metrics/client.js +30 -0
- package/packages/dd-trace/src/runtime_metrics/index.js +14 -4
- package/packages/dd-trace/src/runtime_metrics/otlp_runtime_metrics.js +284 -0
- package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +42 -41
- package/packages/dd-trace/src/sampling_rule.js +7 -7
- package/packages/dd-trace/src/scope.js +10 -15
- package/packages/dd-trace/src/serverless.js +6 -7
- package/packages/dd-trace/src/service-naming/extra-services.js +14 -0
- package/packages/dd-trace/src/service-naming/index.js +1 -1
- package/packages/dd-trace/src/service-naming/schemas/definition.js +4 -1
- package/packages/dd-trace/src/service-naming/schemas/util.js +48 -3
- package/packages/dd-trace/src/service-naming/schemas/v0/graphql.js +6 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +61 -2
- package/packages/dd-trace/src/service-naming/schemas/v0/serverless.js +12 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/storage.js +60 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/web.js +25 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/websocket.js +5 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/graphql.js +8 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +32 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/serverless.js +12 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/storage.js +17 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/web.js +23 -3
- package/packages/dd-trace/src/service-naming/schemas/v1/websocket.js +6 -0
- package/packages/dd-trace/src/service-naming/source-resolver.js +50 -0
- package/packages/dd-trace/src/span_format.js +269 -81
- package/packages/dd-trace/src/span_processor.js +13 -13
- package/packages/dd-trace/src/span_stats.js +101 -79
- package/packages/dd-trace/src/spanleak.js +1 -2
- package/packages/dd-trace/src/standalone/index.js +3 -25
- package/packages/dd-trace/src/startup-log.js +3 -3
- package/packages/dd-trace/src/tagger.js +2 -4
- package/packages/dd-trace/src/telemetry/dependencies.js +2 -2
- package/packages/dd-trace/src/telemetry/endpoints.js +7 -5
- package/packages/dd-trace/src/telemetry/index.js +2 -2
- package/packages/dd-trace/src/telemetry/logs/index.js +1 -1
- package/packages/dd-trace/src/telemetry/send-data.js +20 -20
- package/packages/dd-trace/src/telemetry/session-propagation.js +1 -1
- package/packages/dd-trace/src/telemetry/telemetry.js +16 -14
- package/packages/dd-trace/src/tracer.js +23 -9
- package/packages/dd-trace/src/tracer_metadata.js +1 -1
- package/packages/dd-trace/src/util.js +31 -0
- package/register.js +58 -1
- package/vendor/dist/@apm-js-collab/code-transformer/index.js +94 -42
- package/vendor/dist/@datadog/sketches-js/LICENSE +10 -36
- package/vendor/dist/@datadog/sketches-js/index.js +1 -1
- package/vendor/dist/pprof-format/index.js +1 -1
- package/vendor/dist/protobufjs/index.js +1 -1
- package/vendor/dist/protobufjs/minimal/index.js +1 -1
- package/vendor/dist/shell-quote/index.js +1 -1
- package/packages/datadog-plugin-graphql/src/resolve.js +0 -178
- package/packages/dd-trace/src/agent/url.js +0 -28
- package/packages/dd-trace/src/appsec/api_security_sampler.js +0 -117
- package/packages/dd-trace/src/lambda/runtime/ritm.js +0 -133
- package/packages/dd-trace/src/log/utils.js +0 -16
- package/packages/dd-trace/src/msgpack/encoder.js +0 -308
- package/packages/dd-trace/src/plugins/structured_log_plugin.js +0 -9
- package/scripts/preinstall.js +0 -34
- package/vendor/dist/ignore/LICENSE +0 -21
- package/vendor/dist/ignore/index.js +0 -1
- package/vendor/dist/opentracing/LICENSE +0 -201
- package/vendor/dist/opentracing/binary_carrier.d.ts +0 -11
- package/vendor/dist/opentracing/constants.d.ts +0 -61
- package/vendor/dist/opentracing/examples/demo/demo.d.ts +0 -2
- package/vendor/dist/opentracing/ext/tags.d.ts +0 -90
- package/vendor/dist/opentracing/functions.d.ts +0 -20
- package/vendor/dist/opentracing/global_tracer.d.ts +0 -14
- package/vendor/dist/opentracing/index.d.ts +0 -12
- package/vendor/dist/opentracing/index.js +0 -1
- package/vendor/dist/opentracing/mock_tracer/index.d.ts +0 -5
- package/vendor/dist/opentracing/mock_tracer/mock_context.d.ts +0 -13
- package/vendor/dist/opentracing/mock_tracer/mock_report.d.ts +0 -16
- package/vendor/dist/opentracing/mock_tracer/mock_span.d.ts +0 -50
- package/vendor/dist/opentracing/mock_tracer/mock_tracer.d.ts +0 -26
- package/vendor/dist/opentracing/noop.d.ts +0 -8
- package/vendor/dist/opentracing/reference.d.ts +0 -33
- package/vendor/dist/opentracing/span.d.ts +0 -147
- package/vendor/dist/opentracing/span_context.d.ts +0 -26
- package/vendor/dist/opentracing/test/api_compatibility.d.ts +0 -16
- package/vendor/dist/opentracing/test/mocktracer_implemenation.d.ts +0 -3
- package/vendor/dist/opentracing/test/noop_implementation.d.ts +0 -4
- package/vendor/dist/opentracing/test/opentracing_api.d.ts +0 -3
- package/vendor/dist/opentracing/test/unittest.d.ts +0 -2
- package/vendor/dist/opentracing/tracer.d.ts +0 -127
- package/vendor/dist/path-to-regexp/LICENSE +0 -21
- package/vendor/dist/path-to-regexp/index.js +0 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientRequest, IncomingMessage, OutgoingMessage, ServerResponse } from "http";
|
|
2
2
|
import { LookupFunction } from 'net';
|
|
3
|
-
import * as opentracing from "
|
|
3
|
+
import * as opentracing from "opentracing";
|
|
4
4
|
import * as otel from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -19,6 +19,12 @@ interface Tracer extends opentracing.Tracer {
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Starts and returns a new Span representing a logical unit of work.
|
|
22
|
+
*
|
|
23
|
+
* The returned span is not activated on the current scope. Spans created
|
|
24
|
+
* while it is open — via {@link Tracer.trace} or auto-instrumentation — only
|
|
25
|
+
* nest under it when it is the active span, so wrap the work in
|
|
26
|
+
* {@link Scope.activate} (or use {@link Tracer.trace}) when child spans
|
|
27
|
+
* should descend from it.
|
|
22
28
|
* @param {string} name The name of the operation.
|
|
23
29
|
* @param {tracer.SpanOptions} [options] Options for the newly created span.
|
|
24
30
|
* @returns {Span} A new Span object.
|
|
@@ -218,8 +224,8 @@ interface Tracer extends opentracing.Tracer {
|
|
|
218
224
|
removeAllBaggageItems (): Record<string, string>;
|
|
219
225
|
}
|
|
220
226
|
|
|
221
|
-
//
|
|
222
|
-
//
|
|
227
|
+
// Left out of the namespace, so it doesn't need to be exported for Tracer.
|
|
228
|
+
// Only include plugins here that can be either disabled or configured.
|
|
223
229
|
/** @hidden */
|
|
224
230
|
interface Plugins {
|
|
225
231
|
"aerospike": tracer.plugins.aerospike;
|
|
@@ -227,9 +233,12 @@ interface Plugins {
|
|
|
227
233
|
"amqp10": tracer.plugins.amqp10;
|
|
228
234
|
"amqplib": tracer.plugins.amqplib;
|
|
229
235
|
"anthropic": tracer.plugins.anthropic;
|
|
236
|
+
"claude-agent-sdk": tracer.plugins.claude_agent_sdk;
|
|
230
237
|
"apollo": tracer.plugins.apollo;
|
|
231
238
|
"avsc": tracer.plugins.avsc;
|
|
239
|
+
"aws-durable-execution-sdk-js": tracer.plugins.aws_durable_execution_sdk_js;
|
|
232
240
|
"aws-sdk": tracer.plugins.aws_sdk;
|
|
241
|
+
"azure-cosmos": tracer.plugins.azure_cosmos;
|
|
233
242
|
"azure-event-hubs": tracer.plugins.azure_event_hubs;
|
|
234
243
|
"azure-functions": tracer.plugins.azure_functions;
|
|
235
244
|
"azure-service-bus": tracer.plugins.azure_service_bus;
|
|
@@ -245,12 +254,12 @@ interface Plugins {
|
|
|
245
254
|
"cypress": tracer.plugins.cypress;
|
|
246
255
|
"dns": tracer.plugins.dns;
|
|
247
256
|
"elasticsearch": tracer.plugins.elasticsearch;
|
|
257
|
+
"electron": tracer.plugins.electron;
|
|
248
258
|
"express": tracer.plugins.express;
|
|
249
259
|
"fastify": tracer.plugins.fastify;
|
|
250
260
|
"fetch": tracer.plugins.fetch;
|
|
251
261
|
"find-my-way": tracer.plugins.find_my_way;
|
|
252
262
|
"fs": tracer.plugins.fs;
|
|
253
|
-
"generic-pool": tracer.plugins.generic_pool;
|
|
254
263
|
"google-cloud-pubsub": tracer.plugins.google_cloud_pubsub;
|
|
255
264
|
"google-cloud-vertexai": tracer.plugins.google_cloud_vertexai;
|
|
256
265
|
"google-genai": tracer.plugins.google_genai;
|
|
@@ -264,7 +273,6 @@ interface Plugins {
|
|
|
264
273
|
"iovalkey": tracer.plugins.iovalkey;
|
|
265
274
|
"jest": tracer.plugins.jest;
|
|
266
275
|
"kafkajs": tracer.plugins.kafkajs;
|
|
267
|
-
"knex": tracer.plugins.knex;
|
|
268
276
|
"koa": tracer.plugins.koa;
|
|
269
277
|
"langchain": tracer.plugins.langchain;
|
|
270
278
|
"langgraph": tracer.plugins.langgraph;
|
|
@@ -272,11 +280,13 @@ interface Plugins {
|
|
|
272
280
|
"memcached": tracer.plugins.memcached;
|
|
273
281
|
"microgateway-core": tracer.plugins.microgateway_core;
|
|
274
282
|
"mocha": tracer.plugins.mocha;
|
|
283
|
+
"modelcontextprotocol-sdk": tracer.plugins.modelcontextprotocol_sdk;
|
|
275
284
|
"moleculer": tracer.plugins.moleculer;
|
|
276
285
|
"mongodb-core": tracer.plugins.mongodb_core;
|
|
277
286
|
"mongoose": tracer.plugins.mongoose;
|
|
278
287
|
"mysql": tracer.plugins.mysql;
|
|
279
288
|
"mysql2": tracer.plugins.mysql2;
|
|
289
|
+
"nats": tracer.plugins.nats;
|
|
280
290
|
"net": tracer.plugins.net;
|
|
281
291
|
"next": tracer.plugins.next;
|
|
282
292
|
"nyc": tracer.plugins.nyc;
|
|
@@ -351,17 +361,6 @@ declare namespace tracer {
|
|
|
351
361
|
export interface Span extends opentracing.Span {
|
|
352
362
|
context (): SpanContext;
|
|
353
363
|
|
|
354
|
-
/**
|
|
355
|
-
* Causally links another span to the current span
|
|
356
|
-
*
|
|
357
|
-
* @deprecated In favor of addLink(link: { context: SpanContext, attributes?: Object }).
|
|
358
|
-
* This will be removed in the next major version.
|
|
359
|
-
* @param {SpanContext} context The context of the span to link to.
|
|
360
|
-
* @param {Object} attributes An optional key value pair of arbitrary values.
|
|
361
|
-
* @returns {void}
|
|
362
|
-
*/
|
|
363
|
-
addLink (context: SpanContext, attributes?: Object): void;
|
|
364
|
-
|
|
365
364
|
/**
|
|
366
365
|
* Adds a single link to the span.
|
|
367
366
|
*
|
|
@@ -415,7 +414,7 @@ declare namespace tracer {
|
|
|
415
414
|
*/
|
|
416
415
|
export interface SamplingRule {
|
|
417
416
|
/**
|
|
418
|
-
* Sampling rate for this rule.
|
|
417
|
+
* Sampling rate for this rule. A range between 0 and 1 representing the percent of traces sampled.
|
|
419
418
|
*/
|
|
420
419
|
sampleRate: number
|
|
421
420
|
|
|
@@ -428,6 +427,22 @@ declare namespace tracer {
|
|
|
428
427
|
* Operation name on which to apply this rule. The rule will apply to all operation names if not provided.
|
|
429
428
|
*/
|
|
430
429
|
name?: string | RegExp
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Resource name on which to apply this rule. The rule will apply to all resource names if not provided.
|
|
433
|
+
*/
|
|
434
|
+
resource?: string | RegExp
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Span tags on which to apply this rule, keyed by tag name. Each value is a glob pattern or regular
|
|
438
|
+
* expression, and the rule only applies when every entry matches the span's tags.
|
|
439
|
+
*/
|
|
440
|
+
tags?: { [key: string]: string | RegExp }
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Maximum number of traces matching this rule to sample per second.
|
|
444
|
+
*/
|
|
445
|
+
maxPerSecond?: number
|
|
431
446
|
}
|
|
432
447
|
|
|
433
448
|
/**
|
|
@@ -609,10 +624,10 @@ declare namespace tracer {
|
|
|
609
624
|
rateLimit?: number,
|
|
610
625
|
|
|
611
626
|
/**
|
|
612
|
-
* Sampling rules to apply to priority sampling. Each rule
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
* specified, will defer to global sampling rate for all spans.
|
|
627
|
+
* Sampling rules to apply to priority sampling. Each rule matches against a trace's
|
|
628
|
+
* `service`, `name`, `resource`, and `tags`, and applies the rule's `sampleRate`. Use a
|
|
629
|
+
* `sampleRate` of `0` to drop matching traces (for example to filter out unwanted resources).
|
|
630
|
+
* If not specified, will defer to global sampling rate for all spans.
|
|
616
631
|
* @default []
|
|
617
632
|
* @env DD_TRACE_SAMPLING_RULES
|
|
618
633
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
@@ -649,23 +664,31 @@ declare namespace tracer {
|
|
|
649
664
|
*/
|
|
650
665
|
runtimeMetrics?: boolean | {
|
|
651
666
|
|
|
652
|
-
|
|
667
|
+
/**
|
|
653
668
|
* @env DD_RUNTIME_METRICS_ENABLED
|
|
654
669
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
655
670
|
*/
|
|
656
671
|
enabled?: boolean,
|
|
657
672
|
|
|
658
|
-
|
|
673
|
+
/**
|
|
659
674
|
* @env DD_RUNTIME_METRICS_GC_ENABLED
|
|
660
675
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
661
676
|
*/
|
|
662
677
|
gc?: boolean,
|
|
663
678
|
|
|
664
|
-
|
|
679
|
+
/**
|
|
665
680
|
* @env DD_RUNTIME_METRICS_EVENT_LOOP_ENABLED
|
|
666
681
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
667
682
|
*/
|
|
668
|
-
eventLoop?: boolean
|
|
683
|
+
eventLoop?: boolean,
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Whether to use native metrics. When set to false, forces the JS implementation
|
|
687
|
+
* @default true
|
|
688
|
+
* @env DD_RUNTIME_METRICS_NATIVE
|
|
689
|
+
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
690
|
+
*/
|
|
691
|
+
native?: boolean
|
|
669
692
|
}
|
|
670
693
|
|
|
671
694
|
/**
|
|
@@ -690,28 +713,6 @@ declare namespace tracer {
|
|
|
690
713
|
*/
|
|
691
714
|
protocolVersion?: string
|
|
692
715
|
|
|
693
|
-
/**
|
|
694
|
-
* Deprecated in favor of the global versions of the variables provided under this option
|
|
695
|
-
*
|
|
696
|
-
* @deprecated
|
|
697
|
-
* @hidden
|
|
698
|
-
*/
|
|
699
|
-
ingestion?: {
|
|
700
|
-
/**
|
|
701
|
-
* Controls the ingestion sample rate (between 0 and 1) between the agent and the backend.
|
|
702
|
-
* @env DD_TRACE_SAMPLE_RATE
|
|
703
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
704
|
-
*/
|
|
705
|
-
sampleRate?: number
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Controls the ingestion rate limit between the agent and the backend. Defaults to deferring the decision to the agent.
|
|
709
|
-
* @env DD_TRACE_RATE_LIMIT
|
|
710
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
711
|
-
*/
|
|
712
|
-
rateLimit?: number
|
|
713
|
-
};
|
|
714
|
-
|
|
715
716
|
/**
|
|
716
717
|
* Whether to enable inferred proxy services.
|
|
717
718
|
* @default false
|
|
@@ -734,19 +735,12 @@ declare namespace tracer {
|
|
|
734
735
|
*/
|
|
735
736
|
experimental?: {
|
|
736
737
|
|
|
737
|
-
/**
|
|
738
|
-
* @default false
|
|
739
|
-
* @env DD_TRACE_EXPERIMENTAL_B3_ENABLED
|
|
740
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
741
|
-
*/
|
|
742
|
-
b3?: boolean
|
|
743
|
-
|
|
744
738
|
/**
|
|
745
739
|
* Whether to write traces to log output or agentless, rather than send to an agent
|
|
746
740
|
* @env DD_TRACE_EXPERIMENTAL_EXPORTER
|
|
747
741
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
748
742
|
*/
|
|
749
|
-
exporter?: 'log' | 'agent' | 'datadog'
|
|
743
|
+
exporter?: 'log' | 'agent' | 'datadog' | 'electron'
|
|
750
744
|
|
|
751
745
|
/**
|
|
752
746
|
* Whether to enable the experimental `getRumData` method.
|
|
@@ -756,34 +750,6 @@ declare namespace tracer {
|
|
|
756
750
|
*/
|
|
757
751
|
enableGetRumData?: boolean
|
|
758
752
|
|
|
759
|
-
/**
|
|
760
|
-
* Configuration of the IAST. Can be a boolean as an alias to `iast.enabled`.
|
|
761
|
-
* @deprecated Please use the non-experimental `iast` option instead.
|
|
762
|
-
*/
|
|
763
|
-
iast?: boolean | IastOptions
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* Configuration of the AppSec. Can be a boolean as an alias to `appsec.enabled`.
|
|
767
|
-
* @deprecated Please use the non-experimental `appsec` option instead.
|
|
768
|
-
*/
|
|
769
|
-
appsec?: boolean | {
|
|
770
|
-
/**
|
|
771
|
-
* Configuration of Standalone ASM mode
|
|
772
|
-
* Deprecated in favor of `apmTracingEnabled`.
|
|
773
|
-
*
|
|
774
|
-
* @deprecated Please use `apmTracingEnabled` instead.
|
|
775
|
-
*/
|
|
776
|
-
standalone?: {
|
|
777
|
-
/**
|
|
778
|
-
* Whether to enable Standalone ASM.
|
|
779
|
-
* @default false
|
|
780
|
-
* @env DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED
|
|
781
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
782
|
-
*/
|
|
783
|
-
enabled?: boolean
|
|
784
|
-
}
|
|
785
|
-
} | TracerOptions['appsec'],
|
|
786
|
-
|
|
787
753
|
aiguard?: {
|
|
788
754
|
/**
|
|
789
755
|
* Set to `true` to enable the SDK.
|
|
@@ -795,7 +761,7 @@ declare namespace tracer {
|
|
|
795
761
|
* Whether to request blocking mode when evaluating prompts via auto-instrumentation.
|
|
796
762
|
* When `true`, AI Guard will block requests that violate security policies.
|
|
797
763
|
* When `false`, AI Guard evaluates but never blocks (monitor-only mode).
|
|
798
|
-
* @default
|
|
764
|
+
* @default true
|
|
799
765
|
* @env DD_AI_GUARD_BLOCK
|
|
800
766
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
801
767
|
*/
|
|
@@ -852,6 +818,21 @@ declare namespace tracer {
|
|
|
852
818
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
853
819
|
*/
|
|
854
820
|
initializationTimeoutMs?: number
|
|
821
|
+
/**
|
|
822
|
+
* Configuration for span enrichment with feature flag evaluation data.
|
|
823
|
+
*/
|
|
824
|
+
spanEnrichment?: {
|
|
825
|
+
/**
|
|
826
|
+
* Whether to enable span enrichment with feature flag data.
|
|
827
|
+
* When enabled, feature flag evaluation metadata is attached to APM spans.
|
|
828
|
+
* Can be configured via DD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED environment variable.
|
|
829
|
+
*
|
|
830
|
+
* @default false
|
|
831
|
+
* @env DD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED
|
|
832
|
+
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
833
|
+
*/
|
|
834
|
+
enabled?: boolean
|
|
835
|
+
}
|
|
855
836
|
}
|
|
856
837
|
};
|
|
857
838
|
|
|
@@ -899,11 +880,20 @@ declare namespace tracer {
|
|
|
899
880
|
|
|
900
881
|
/**
|
|
901
882
|
* Enables DBM to APM link using tag injection.
|
|
883
|
+
*
|
|
884
|
+
* - `disabled`: No SQL comment is injected (default).
|
|
885
|
+
* - `service`: Injects a SQL comment with service-level tags (database name, service, environment,
|
|
886
|
+
* host, tracer service, tracer version). Enables DBM–APM correlation without full trace linking.
|
|
887
|
+
* - `full`: Same as `service`, plus a W3C `traceparent` for full distributed trace correlation.
|
|
888
|
+
* - `dynamic_service`: Same as `service`, but also automatically injects the propagation hash
|
|
889
|
+
* (`ddsh`) when process tags are enabled (`DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED=true`).
|
|
890
|
+
* This is a convenience shorthand for `service` + `DD_DBM_INJECT_SQL_BASEHASH=true`.
|
|
891
|
+
*
|
|
902
892
|
* @default 'disabled'
|
|
903
893
|
* @env DD_DBM_PROPAGATION_MODE
|
|
904
894
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
905
895
|
*/
|
|
906
|
-
dbmPropagationMode?: 'disabled' | 'service' | 'full'
|
|
896
|
+
dbmPropagationMode?: 'disabled' | 'service' | 'full' | 'dynamic_service'
|
|
907
897
|
|
|
908
898
|
/**
|
|
909
899
|
* Whether to enable Data Streams Monitoring.
|
|
@@ -1061,15 +1051,6 @@ declare namespace tracer {
|
|
|
1061
1051
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1062
1052
|
*/
|
|
1063
1053
|
enabled?: boolean,
|
|
1064
|
-
|
|
1065
|
-
/** Whether to enable request body collection on RASP event
|
|
1066
|
-
* @default false
|
|
1067
|
-
*
|
|
1068
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1069
|
-
* @env DD_APPSEC_RASP_COLLECT_REQUEST_BODY
|
|
1070
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1071
|
-
*/
|
|
1072
|
-
bodyCollection?: boolean
|
|
1073
1054
|
},
|
|
1074
1055
|
/**
|
|
1075
1056
|
* Configuration for stack trace reporting
|
|
@@ -1096,39 +1077,6 @@ declare namespace tracer {
|
|
|
1096
1077
|
*/
|
|
1097
1078
|
maxDepth?: number,
|
|
1098
1079
|
},
|
|
1099
|
-
/**
|
|
1100
|
-
* Configuration for extended headers collection tied to security events
|
|
1101
|
-
*
|
|
1102
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1103
|
-
*/
|
|
1104
|
-
extendedHeadersCollection?: {
|
|
1105
|
-
/** Whether to enable extended headers collection
|
|
1106
|
-
* @default false
|
|
1107
|
-
*
|
|
1108
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1109
|
-
* @env DD_APPSEC_COLLECT_ALL_HEADERS
|
|
1110
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1111
|
-
*/
|
|
1112
|
-
enabled: boolean,
|
|
1113
|
-
|
|
1114
|
-
/** Whether to redact collected headers
|
|
1115
|
-
* @default true
|
|
1116
|
-
*
|
|
1117
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1118
|
-
* @env DD_APPSEC_HEADER_COLLECTION_REDACTION_ENABLED
|
|
1119
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1120
|
-
*/
|
|
1121
|
-
redaction: boolean,
|
|
1122
|
-
|
|
1123
|
-
/** Specifies the maximum number of headers collected.
|
|
1124
|
-
* @default 50
|
|
1125
|
-
*
|
|
1126
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1127
|
-
* @env DD_APPSEC_MAX_COLLECTED_HEADERS
|
|
1128
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1129
|
-
*/
|
|
1130
|
-
maxHeaders: number,
|
|
1131
|
-
}
|
|
1132
1080
|
}
|
|
1133
1081
|
|
|
1134
1082
|
/**
|
|
@@ -1315,7 +1263,7 @@ declare namespace tracer {
|
|
|
1315
1263
|
|
|
1316
1264
|
/**
|
|
1317
1265
|
* Whether to use Datadog legacy baggage extraction and injection behavior.
|
|
1318
|
-
* @default
|
|
1266
|
+
* @default true
|
|
1319
1267
|
* @env DD_TRACE_LEGACY_BAGGAGE_ENABLED
|
|
1320
1268
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1321
1269
|
*/
|
|
@@ -1847,6 +1795,10 @@ declare namespace tracer {
|
|
|
1847
1795
|
* List of tags associated with the evaluation (e.g. indirect-prompt-injection)
|
|
1848
1796
|
*/
|
|
1849
1797
|
tags: string[];
|
|
1798
|
+
/**
|
|
1799
|
+
* Dictionary of tag probabilities (e.g. { indirect-prompt-injection: 0.2, jailbreak-attempt: 0.8 })
|
|
1800
|
+
*/
|
|
1801
|
+
tagProbabilities: { [key: string]: number }
|
|
1850
1802
|
/**
|
|
1851
1803
|
* Sensitive Data Scanner findings from the evaluation.
|
|
1852
1804
|
*/
|
|
@@ -1866,6 +1818,10 @@ declare namespace tracer {
|
|
|
1866
1818
|
* List of tags associated with the evaluation (e.g. indirect-prompt-injection)
|
|
1867
1819
|
*/
|
|
1868
1820
|
tags: string[];
|
|
1821
|
+
/**
|
|
1822
|
+
* Dictionary of tag probabilities (e.g. { indirect-prompt-injection: 0.2, jailbreak-attempt: 0.8 })
|
|
1823
|
+
*/
|
|
1824
|
+
tagProbabilities: { [key: string]: number }
|
|
1869
1825
|
/**
|
|
1870
1826
|
* Sensitive Data Scanner findings from the evaluation.
|
|
1871
1827
|
*/
|
|
@@ -1980,6 +1936,20 @@ declare namespace tracer {
|
|
|
1980
1936
|
/** @hidden */
|
|
1981
1937
|
interface Instrumentation extends Integration, Analyzable {}
|
|
1982
1938
|
|
|
1939
|
+
/** @hidden */
|
|
1940
|
+
interface DatabaseInstrumentation extends Instrumentation {
|
|
1941
|
+
/**
|
|
1942
|
+
* Truncate the resource name (e.g. the query) to the given length.
|
|
1943
|
+
* When set to `true`, truncates to 5000 characters (matching the
|
|
1944
|
+
* Datadog agent's default). When set to a number, truncates to that
|
|
1945
|
+
* many characters. This can help prevent large queries from blocking
|
|
1946
|
+
* the event loop during trace encoding.
|
|
1947
|
+
*
|
|
1948
|
+
* @default false
|
|
1949
|
+
*/
|
|
1950
|
+
truncate?: boolean | number;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1983
1953
|
/** @hidden */
|
|
1984
1954
|
interface Http extends Instrumentation {
|
|
1985
1955
|
/**
|
|
@@ -1993,14 +1963,6 @@ declare namespace tracer {
|
|
|
1993
1963
|
*/
|
|
1994
1964
|
allowlist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
1995
1965
|
|
|
1996
|
-
/**
|
|
1997
|
-
* Deprecated in favor of `allowlist`.
|
|
1998
|
-
*
|
|
1999
|
-
* @deprecated
|
|
2000
|
-
* @hidden
|
|
2001
|
-
*/
|
|
2002
|
-
whitelist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2003
|
-
|
|
2004
1966
|
/**
|
|
2005
1967
|
* List of URLs/paths that should not be instrumented. Takes precedence over
|
|
2006
1968
|
* allowlist if a URL matches an entry in both.
|
|
@@ -2013,14 +1975,6 @@ declare namespace tracer {
|
|
|
2013
1975
|
*/
|
|
2014
1976
|
blocklist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2015
1977
|
|
|
2016
|
-
/**
|
|
2017
|
-
* Deprecated in favor of `blocklist`.
|
|
2018
|
-
*
|
|
2019
|
-
* @deprecated
|
|
2020
|
-
* @hidden
|
|
2021
|
-
*/
|
|
2022
|
-
blacklist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2023
|
-
|
|
2024
1978
|
/**
|
|
2025
1979
|
* Custom filter function used to decide whether a URL/path is allowed.
|
|
2026
1980
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -2200,7 +2154,7 @@ declare namespace tracer {
|
|
|
2200
2154
|
}
|
|
2201
2155
|
|
|
2202
2156
|
/** @hidden */
|
|
2203
|
-
interface Prisma extends
|
|
2157
|
+
interface Prisma extends DatabaseInstrumentation {}
|
|
2204
2158
|
|
|
2205
2159
|
/** @hidden */
|
|
2206
2160
|
interface PrismaClient extends Prisma {}
|
|
@@ -2238,6 +2192,12 @@ declare namespace tracer {
|
|
|
2238
2192
|
*/
|
|
2239
2193
|
interface anthropic extends Instrumentation {}
|
|
2240
2194
|
|
|
2195
|
+
/**
|
|
2196
|
+
* This plugin automatically instruments the
|
|
2197
|
+
* [@anthropic-ai/claude-agent-sdk](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) module.
|
|
2198
|
+
*/
|
|
2199
|
+
interface claude_agent_sdk extends Instrumentation {}
|
|
2200
|
+
|
|
2241
2201
|
/**
|
|
2242
2202
|
* Currently this plugin automatically instruments
|
|
2243
2203
|
* [@apollo/gateway](https://github.com/apollographql/federation) for module versions >= v2.3.0.
|
|
@@ -2287,11 +2247,25 @@ declare namespace tracer {
|
|
|
2287
2247
|
*/
|
|
2288
2248
|
interface avsc extends Integration {}
|
|
2289
2249
|
|
|
2250
|
+
/**
|
|
2251
|
+
* This plugin automatically instruments the
|
|
2252
|
+
* [aws-durable-execution-sdk-js](https://github.com/aws/aws-durable-execution-sdk-js) module.
|
|
2253
|
+
*/
|
|
2254
|
+
interface aws_durable_execution_sdk_js extends Integration {}
|
|
2255
|
+
|
|
2290
2256
|
/**
|
|
2291
2257
|
* This plugin automatically instruments the
|
|
2292
2258
|
* [aws-sdk](https://github.com/aws/aws-sdk-js) module.
|
|
2293
2259
|
*/
|
|
2294
2260
|
interface aws_sdk extends Instrumentation {
|
|
2261
|
+
/**
|
|
2262
|
+
* The service name to be used for this plugin. When a function is used it is called with the AWS
|
|
2263
|
+
* request parameters (e.g. `{ TableName }` for DynamoDB, `{ Bucket }` for S3) and its return value
|
|
2264
|
+
* is used as the service name. Returning a nullish value falls back to the default service name, so
|
|
2265
|
+
* individual resources can be mapped without renaming every call to the service.
|
|
2266
|
+
*/
|
|
2267
|
+
service?: string | ((params: anyObject) => string | undefined | null);
|
|
2268
|
+
|
|
2295
2269
|
/**
|
|
2296
2270
|
* Whether to inject all messages during batch AWS SQS, Kinesis, and SNS send operations. Normal
|
|
2297
2271
|
* behavior is to inject the first message in batch send operations.
|
|
@@ -2319,6 +2293,12 @@ declare namespace tracer {
|
|
|
2319
2293
|
[key: string]: boolean | Object | undefined;
|
|
2320
2294
|
}
|
|
2321
2295
|
|
|
2296
|
+
/**
|
|
2297
|
+
* This plugin automatically instruments the
|
|
2298
|
+
* @azure/cosmos module
|
|
2299
|
+
*/
|
|
2300
|
+
interface azure_cosmos extends Integration {}
|
|
2301
|
+
|
|
2322
2302
|
/**
|
|
2323
2303
|
* This plugin automatically instruments the
|
|
2324
2304
|
* @azure/event-hubs module
|
|
@@ -2358,7 +2338,21 @@ declare namespace tracer {
|
|
|
2358
2338
|
* This plugin automatically instruments the
|
|
2359
2339
|
* [bullmq](https://github.com/npmjs/package/bullmq) message queue library.
|
|
2360
2340
|
*/
|
|
2361
|
-
interface bullmq extends Instrumentation {
|
|
2341
|
+
interface bullmq extends Instrumentation {
|
|
2342
|
+
/**
|
|
2343
|
+
* Filter applied to BullMQ producer operations (`Queue.add`, `Queue.addBulk`,
|
|
2344
|
+
* `FlowProducer.add`). Return `false` to skip span creation, trace context
|
|
2345
|
+
* injection, and DSM checkpoint handling for the matching job. Consumer-side
|
|
2346
|
+
* (`Worker`) instrumentation is unaffected.
|
|
2347
|
+
*
|
|
2348
|
+
* @param job.name - The BullMQ job name.
|
|
2349
|
+
* @param job.data - The BullMQ job data.
|
|
2350
|
+
* @param job.opts - The BullMQ job options.
|
|
2351
|
+
* @param job.queueName - The name of the queue the job is being added to.
|
|
2352
|
+
* @returns true to instrument the producer operation, false to skip it.
|
|
2353
|
+
*/
|
|
2354
|
+
producerFilter?: (job: { name?: string; data?: unknown; opts?: unknown; queueName?: string }) => boolean;
|
|
2355
|
+
}
|
|
2362
2356
|
|
|
2363
2357
|
interface bunyan extends Integration {}
|
|
2364
2358
|
|
|
@@ -2426,6 +2420,26 @@ declare namespace tracer {
|
|
|
2426
2420
|
};
|
|
2427
2421
|
}
|
|
2428
2422
|
|
|
2423
|
+
/**
|
|
2424
|
+
* This plugin automatically instruments the
|
|
2425
|
+
* [electron](https://github.com/electron/electron) module.
|
|
2426
|
+
*/
|
|
2427
|
+
interface electron extends Instrumentation {
|
|
2428
|
+
/**
|
|
2429
|
+
* Whether to enable instrumentation of ipc spans
|
|
2430
|
+
*
|
|
2431
|
+
* @default true
|
|
2432
|
+
*/
|
|
2433
|
+
ipc?: boolean;
|
|
2434
|
+
|
|
2435
|
+
/**
|
|
2436
|
+
* Whether to enable instrumentation of net spans
|
|
2437
|
+
*
|
|
2438
|
+
* @default true
|
|
2439
|
+
*/
|
|
2440
|
+
net?: boolean;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2429
2443
|
/**
|
|
2430
2444
|
* This plugin automatically instruments the
|
|
2431
2445
|
* [express](http://expressjs.com/) module.
|
|
@@ -2454,12 +2468,6 @@ declare namespace tracer {
|
|
|
2454
2468
|
*/
|
|
2455
2469
|
interface fs extends Instrumentation {}
|
|
2456
2470
|
|
|
2457
|
-
/**
|
|
2458
|
-
* This plugin patches the [generic-pool](https://github.com/coopernurse/node-pool)
|
|
2459
|
-
* module to bind the callbacks the the caller context.
|
|
2460
|
-
*/
|
|
2461
|
-
interface generic_pool extends Integration {}
|
|
2462
|
-
|
|
2463
2471
|
/**
|
|
2464
2472
|
* This plugin automatically instruments the
|
|
2465
2473
|
* [@google-cloud/pubsub](https://github.com/googleapis/nodejs-pubsub) module.
|
|
@@ -2470,30 +2478,49 @@ declare namespace tracer {
|
|
|
2470
2478
|
* This plugin automatically instruments the
|
|
2471
2479
|
* [@google-cloud/vertexai](https://github.com/googleapis/nodejs-vertexai) module.
|
|
2472
2480
|
*/
|
|
2473
|
-
|
|
2481
|
+
interface google_cloud_vertexai extends Integration {}
|
|
2474
2482
|
|
|
2475
|
-
|
|
2483
|
+
/**
|
|
2476
2484
|
* This plugin automatically instruments the
|
|
2477
2485
|
* [@google-genai](https://github.com/googleapis/js-genai) module.
|
|
2478
2486
|
*/
|
|
2479
|
-
|
|
2487
|
+
interface google_genai extends Integration {}
|
|
2488
|
+
|
|
2489
|
+
/** @hidden */
|
|
2490
|
+
interface ExecutionArgs {
|
|
2491
|
+
schema: any,
|
|
2492
|
+
document: any,
|
|
2493
|
+
rootValue?: any,
|
|
2494
|
+
contextValue?: any,
|
|
2495
|
+
variableValues?: any,
|
|
2496
|
+
operationName?: string,
|
|
2497
|
+
fieldResolver?: any,
|
|
2498
|
+
typeResolver?: any,
|
|
2499
|
+
}
|
|
2480
2500
|
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2501
|
+
/** Context object passed to the `hooks.resolve` callback for each instrumented field. */
|
|
2502
|
+
interface FieldContext {
|
|
2503
|
+
/** The field name being resolved */
|
|
2504
|
+
fieldName: string;
|
|
2505
|
+
/** The dot-separated field path (e.g. `'user.address.city'`) */
|
|
2506
|
+
path: string;
|
|
2507
|
+
/** The error from the resolver, or `null` if it succeeded */
|
|
2508
|
+
error: Error | null;
|
|
2509
|
+
/** The value returned by the resolver (sync resolvers only; `undefined` for async) */
|
|
2510
|
+
result: unknown;
|
|
2491
2511
|
}
|
|
2492
2512
|
|
|
2493
2513
|
/**
|
|
2494
2514
|
* This plugin automatically instruments the
|
|
2495
2515
|
* [graphql](https://github.com/graphql/graphql-js) module.
|
|
2496
2516
|
*
|
|
2517
|
+
* It also instruments [mercurius](https://github.com/mercurius-js/mercurius)
|
|
2518
|
+
* (the Fastify GraphQL adapter): every request through `app.graphql` /
|
|
2519
|
+
* `reply.graphql` opens a top-level `graphql.request` span that parents the
|
|
2520
|
+
* `graphql.parse`/`graphql.validate`/`graphql.execute` spans and carries the
|
|
2521
|
+
* request text. This span is produced even when mercurius serves the query
|
|
2522
|
+
* from its JIT-compiled path, where `graphql.execute` does not run.
|
|
2523
|
+
*
|
|
2497
2524
|
* The `graphql` integration uses the operation name as the span resource name.
|
|
2498
2525
|
* If no operation name is set, the resource name will always be just `query`,
|
|
2499
2526
|
* `mutation` or `subscription`.
|
|
@@ -2518,8 +2545,11 @@ declare namespace tracer {
|
|
|
2518
2545
|
/**
|
|
2519
2546
|
* The maximum depth of fields/resolvers to instrument. Set to `0` to only
|
|
2520
2547
|
* instrument the operation or to `-1` to instrument all fields/resolvers.
|
|
2548
|
+
* Counts selection-set nesting (named fields) only; list indices do not
|
|
2549
|
+
* count toward the limit, regardless of `collapse`.
|
|
2521
2550
|
*
|
|
2522
2551
|
* @default -1
|
|
2552
|
+
* @env DD_TRACE_GRAPHQL_DEPTH
|
|
2523
2553
|
*/
|
|
2524
2554
|
depth?: number;
|
|
2525
2555
|
|
|
@@ -2536,7 +2566,10 @@ declare namespace tracer {
|
|
|
2536
2566
|
/**
|
|
2537
2567
|
* An array of variable names to record. Can also be a callback that returns
|
|
2538
2568
|
* the key/value pairs to record. For example, using
|
|
2539
|
-
* `variables => variables` would record all variables.
|
|
2569
|
+
* `variables => variables` would record all variables. The environment
|
|
2570
|
+
* variable only accepts the array form (comma-separated variable names).
|
|
2571
|
+
*
|
|
2572
|
+
* @env DD_TRACE_GRAPHQL_VARIABLES
|
|
2540
2573
|
*/
|
|
2541
2574
|
variables?: string[] | ((variables: { [key: string]: any }) => { [key: string]: any });
|
|
2542
2575
|
|
|
@@ -2545,9 +2578,18 @@ declare namespace tracer {
|
|
|
2545
2578
|
* `users.*.name` span instead of `users.0.name`, `users.1.name`, etc)
|
|
2546
2579
|
*
|
|
2547
2580
|
* @default true
|
|
2581
|
+
* @env DD_TRACE_GRAPHQL_COLLAPSE
|
|
2548
2582
|
*/
|
|
2549
2583
|
collapse?: boolean;
|
|
2550
2584
|
|
|
2585
|
+
/**
|
|
2586
|
+
* An array of error `extensions` keys to attach to the span error event
|
|
2587
|
+
* for each GraphQL error.
|
|
2588
|
+
*
|
|
2589
|
+
* @env DD_TRACE_GRAPHQL_ERROR_EXTENSIONS
|
|
2590
|
+
*/
|
|
2591
|
+
errorExtensions?: string[];
|
|
2592
|
+
|
|
2551
2593
|
/**
|
|
2552
2594
|
* Whether to enable signature calculation for the resource name. This can
|
|
2553
2595
|
* be disabled if your GraphQL operations always have a name. Note that when
|
|
@@ -2568,6 +2610,7 @@ declare namespace tracer {
|
|
|
2568
2610
|
execute?: (span?: Span, args?: ExecutionArgs, res?: any) => void;
|
|
2569
2611
|
validate?: (span?: Span, document?: any, errors?: any) => void;
|
|
2570
2612
|
parse?: (span?: Span, source?: any, document?: any) => void;
|
|
2613
|
+
resolve?: (span?: Span, field?: FieldContext) => void;
|
|
2571
2614
|
}
|
|
2572
2615
|
}
|
|
2573
2616
|
|
|
@@ -2666,14 +2709,6 @@ declare namespace tracer {
|
|
|
2666
2709
|
*/
|
|
2667
2710
|
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2668
2711
|
|
|
2669
|
-
/**
|
|
2670
|
-
* Deprecated in favor of `allowlist`.
|
|
2671
|
-
*
|
|
2672
|
-
* @deprecated
|
|
2673
|
-
* @hidden
|
|
2674
|
-
*/
|
|
2675
|
-
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2676
|
-
|
|
2677
2712
|
/**
|
|
2678
2713
|
* List of commands that should not be instrumented. Takes precedence over
|
|
2679
2714
|
* allowlist if a command matches an entry in both. Commands must be in
|
|
@@ -2683,14 +2718,6 @@ declare namespace tracer {
|
|
|
2683
2718
|
*/
|
|
2684
2719
|
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2685
2720
|
|
|
2686
|
-
/**
|
|
2687
|
-
* Deprecated in favor of `blocklist`.
|
|
2688
|
-
*
|
|
2689
|
-
* @deprecated
|
|
2690
|
-
* @hidden
|
|
2691
|
-
*/
|
|
2692
|
-
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2693
|
-
|
|
2694
2721
|
/**
|
|
2695
2722
|
* Custom filter function used to decide whether a Redis command should be instrumented.
|
|
2696
2723
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -2723,14 +2750,6 @@ declare namespace tracer {
|
|
|
2723
2750
|
*/
|
|
2724
2751
|
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2725
2752
|
|
|
2726
|
-
/**
|
|
2727
|
-
* Deprecated in favor of `allowlist`.
|
|
2728
|
-
*
|
|
2729
|
-
* @deprecated
|
|
2730
|
-
* @hidden
|
|
2731
|
-
*/
|
|
2732
|
-
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2733
|
-
|
|
2734
2753
|
/**
|
|
2735
2754
|
* List of commands that should not be instrumented. Takes precedence over
|
|
2736
2755
|
* allowlist if a command matches an entry in both. Commands must be in
|
|
@@ -2740,14 +2759,6 @@ declare namespace tracer {
|
|
|
2740
2759
|
*/
|
|
2741
2760
|
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2742
2761
|
|
|
2743
|
-
/**
|
|
2744
|
-
* Deprecated in favor of `blocklist`.
|
|
2745
|
-
*
|
|
2746
|
-
* @deprecated
|
|
2747
|
-
* @hidden
|
|
2748
|
-
*/
|
|
2749
|
-
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2750
|
-
|
|
2751
2762
|
/**
|
|
2752
2763
|
* Custom filter function used to decide whether a Valkey command should be instrumented.
|
|
2753
2764
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -2773,12 +2784,6 @@ declare namespace tracer {
|
|
|
2773
2784
|
*/
|
|
2774
2785
|
interface jest extends Integration {}
|
|
2775
2786
|
|
|
2776
|
-
/**
|
|
2777
|
-
* This plugin patches the [knex](https://knexjs.org/)
|
|
2778
|
-
* module to bind the promise callback the the caller context.
|
|
2779
|
-
*/
|
|
2780
|
-
interface knex extends Integration {}
|
|
2781
|
-
|
|
2782
2787
|
/**
|
|
2783
2788
|
* This plugin automatically instruments the
|
|
2784
2789
|
* [koa](https://koajs.com/) module.
|
|
@@ -2833,10 +2838,17 @@ declare namespace tracer {
|
|
|
2833
2838
|
*/
|
|
2834
2839
|
interface mocha extends Integration {}
|
|
2835
2840
|
|
|
2841
|
+
/**
|
|
2842
|
+
* This plugin automatically instruments the
|
|
2843
|
+
* [modelcontextprotocol-sdk](https://github.com/npmjs/package/@modelcontextprotocol/sdk) library.
|
|
2844
|
+
*/
|
|
2845
|
+
interface modelcontextprotocol_sdk extends Instrumentation {}
|
|
2846
|
+
|
|
2836
2847
|
/**
|
|
2837
2848
|
* This plugin automatically instruments the
|
|
2838
2849
|
* [moleculer](https://moleculer.services/) module.
|
|
2839
2850
|
*/
|
|
2851
|
+
|
|
2840
2852
|
interface moleculer extends Moleculer {
|
|
2841
2853
|
/**
|
|
2842
2854
|
* Configuration for Moleculer clients. Set to false to disable client
|
|
@@ -2863,6 +2875,24 @@ declare namespace tracer {
|
|
|
2863
2875
|
*/
|
|
2864
2876
|
heartbeatEnabled?: boolean;
|
|
2865
2877
|
|
|
2878
|
+
/**
|
|
2879
|
+
* How to mask primitive query values in the `mongodb.query` tag and the
|
|
2880
|
+
* resource name (when `queryInResourceName` is also enabled). Keys,
|
|
2881
|
+
* operator names, and array / pipeline shape are preserved so the masked
|
|
2882
|
+
* query is still a usable query signature.
|
|
2883
|
+
*
|
|
2884
|
+
* - `'types'`: replace each primitive leaf with its `typeof` name
|
|
2885
|
+
* (`'string'`, `'number'`, `'boolean'`, `'bigint'`, `'object'`,
|
|
2886
|
+
* `'null'`). Keeps the same redaction guarantee as `'redact'` but
|
|
2887
|
+
* preserves the value types so the rendered query can still be used
|
|
2888
|
+
* to design indexes.
|
|
2889
|
+
* - `'redact'`: replace each primitive leaf with `'?'`. Strictest masking.
|
|
2890
|
+
* - `'none'`: do not mask. Values land verbatim on the span.
|
|
2891
|
+
*
|
|
2892
|
+
* @default 'none'
|
|
2893
|
+
*/
|
|
2894
|
+
obfuscateQuery?: 'none' | 'types' | 'redact';
|
|
2895
|
+
|
|
2866
2896
|
/**
|
|
2867
2897
|
* Whether to include the query contents in the resource name.
|
|
2868
2898
|
*/
|
|
@@ -2889,6 +2919,13 @@ declare namespace tracer {
|
|
|
2889
2919
|
*/
|
|
2890
2920
|
interface mysql2 extends mysql {}
|
|
2891
2921
|
|
|
2922
|
+
/**
|
|
2923
|
+
* This plugin automatically instruments the
|
|
2924
|
+
* [@nats-io/transport-node](https://github.com/nats-io/nats.js) and
|
|
2925
|
+
* [@nats-io/nats-core](https://github.com/nats-io/nats.js) modules.
|
|
2926
|
+
*/
|
|
2927
|
+
interface nats extends Instrumentation {}
|
|
2928
|
+
|
|
2892
2929
|
/**
|
|
2893
2930
|
* This plugin automatically instruments the
|
|
2894
2931
|
* [net](https://nodejs.org/api/net.html) module.
|
|
@@ -2958,7 +2995,7 @@ declare namespace tracer {
|
|
|
2958
2995
|
* This plugin automatically instruments the
|
|
2959
2996
|
* [pg](https://node-postgres.com/) module.
|
|
2960
2997
|
*/
|
|
2961
|
-
interface pg extends
|
|
2998
|
+
interface pg extends DatabaseInstrumentation {
|
|
2962
2999
|
/**
|
|
2963
3000
|
* The service name to be used for this plugin. If a function is used, it will be passed the connection parameters and its return value will be used as the service name.
|
|
2964
3001
|
*/
|
|
@@ -3015,14 +3052,6 @@ declare namespace tracer {
|
|
|
3015
3052
|
*/
|
|
3016
3053
|
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3017
3054
|
|
|
3018
|
-
/**
|
|
3019
|
-
* Deprecated in favor of `allowlist`.
|
|
3020
|
-
*
|
|
3021
|
-
* deprecated
|
|
3022
|
-
* @hidden
|
|
3023
|
-
*/
|
|
3024
|
-
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3025
|
-
|
|
3026
3055
|
/**
|
|
3027
3056
|
* List of commands that should not be instrumented. Takes precedence over
|
|
3028
3057
|
* allowlist if a command matches an entry in both.
|
|
@@ -3031,14 +3060,6 @@ declare namespace tracer {
|
|
|
3031
3060
|
*/
|
|
3032
3061
|
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3033
3062
|
|
|
3034
|
-
/**
|
|
3035
|
-
* Deprecated in favor of `blocklist`.
|
|
3036
|
-
*
|
|
3037
|
-
* @deprecated
|
|
3038
|
-
* @hidden
|
|
3039
|
-
*/
|
|
3040
|
-
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3041
|
-
|
|
3042
3063
|
/**
|
|
3043
3064
|
* Custom filter function used to decide whether a Redis command should be instrumented.
|
|
3044
3065
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -3048,6 +3069,14 @@ declare namespace tracer {
|
|
|
3048
3069
|
* @returns true to instrument the command, false to skip it
|
|
3049
3070
|
*/
|
|
3050
3071
|
filter?: (command: string) => boolean;
|
|
3072
|
+
|
|
3073
|
+
/**
|
|
3074
|
+
* Whether to use a different service name for each Redis instance based
|
|
3075
|
+
* on the configured connection name of the client.
|
|
3076
|
+
*
|
|
3077
|
+
* @default false
|
|
3078
|
+
*/
|
|
3079
|
+
splitByInstance?: boolean;
|
|
3051
3080
|
}
|
|
3052
3081
|
|
|
3053
3082
|
/**
|
|
@@ -3066,7 +3095,16 @@ declare namespace tracer {
|
|
|
3066
3095
|
* This plugin automatically instruments the
|
|
3067
3096
|
* [router](https://github.com/pillarjs/router) module.
|
|
3068
3097
|
*/
|
|
3069
|
-
interface router extends Integration {
|
|
3098
|
+
interface router extends Integration {
|
|
3099
|
+
/**
|
|
3100
|
+
* Whether to enable instrumentation of router.middleware spans.
|
|
3101
|
+
* When set to `false`, middleware spans are suppressed but route
|
|
3102
|
+
* tracking (resource name, `http.route` tag) is still performed.
|
|
3103
|
+
*
|
|
3104
|
+
* @default true
|
|
3105
|
+
*/
|
|
3106
|
+
middleware?: boolean;
|
|
3107
|
+
}
|
|
3070
3108
|
|
|
3071
3109
|
/**
|
|
3072
3110
|
* This plugin automatically instruments the
|
|
@@ -3342,16 +3380,6 @@ declare namespace tracer {
|
|
|
3342
3380
|
*/
|
|
3343
3381
|
recordException(exception: Exception, time?: TimeInput): void;
|
|
3344
3382
|
|
|
3345
|
-
/**
|
|
3346
|
-
* Causally links another span to the current span
|
|
3347
|
-
*
|
|
3348
|
-
* @deprecated In favor of addLink(link: otel.Link). This will be removed in the next major version.
|
|
3349
|
-
* @param {otel.SpanContext} context The context of the span to link to.
|
|
3350
|
-
* @param {SpanAttributes} attributes An optional key value pair of arbitrary values.
|
|
3351
|
-
* @returns {void}
|
|
3352
|
-
*/
|
|
3353
|
-
addLink(context: otel.SpanContext, attributes?: SpanAttributes): void;
|
|
3354
|
-
|
|
3355
3383
|
/**
|
|
3356
3384
|
* Adds a single link to the span.
|
|
3357
3385
|
*
|
|
@@ -3512,16 +3540,6 @@ declare namespace tracer {
|
|
|
3512
3540
|
*/
|
|
3513
3541
|
redactionValuePattern?: string,
|
|
3514
3542
|
|
|
3515
|
-
/**
|
|
3516
|
-
* Allows to enable security controls. This option is not supported when
|
|
3517
|
-
* using ESM.
|
|
3518
|
-
* @deprecated Please use the DD_IAST_SECURITY_CONTROLS_CONFIGURATION
|
|
3519
|
-
* environment variable instead. This option will be removed in the next major version.
|
|
3520
|
-
* @env DD_IAST_SECURITY_CONTROLS_CONFIGURATION
|
|
3521
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
3522
|
-
*/
|
|
3523
|
-
securityControlsConfiguration?: string,
|
|
3524
|
-
|
|
3525
3543
|
/**
|
|
3526
3544
|
* Specifies the verbosity of the sent telemetry. Default 'INFORMATION'
|
|
3527
3545
|
* @env DD_IAST_TELEMETRY_VERBOSITY
|
|
@@ -3552,11 +3570,15 @@ declare namespace tracer {
|
|
|
3552
3570
|
|
|
3553
3571
|
/**
|
|
3554
3572
|
* Enable LLM Observability tracing.
|
|
3573
|
+
*
|
|
3574
|
+
* @deprecated Enabling LLM Observability via `llmobs.enable()` is deprecated and will be removed in dd-trace@7.0.0. Please instantiate LLM Observability via DD_LLMOBS_ENABLED or `tracer.init({ llmobs: ...options })`.
|
|
3555
3575
|
*/
|
|
3556
3576
|
enable (options: LLMObsEnableOptions): void,
|
|
3557
3577
|
|
|
3558
3578
|
/**
|
|
3559
3579
|
* Disable LLM Observability tracing.
|
|
3580
|
+
*
|
|
3581
|
+
* @deprecated Disabling LLM Observability via `llmobs.disable()` is deprecated and will be removed in dd-trace@7.0.0. Set DD_LLMOBS_ENABLED=false to disable LLM Observability.
|
|
3560
3582
|
*/
|
|
3561
3583
|
disable (): void,
|
|
3562
3584
|
|
|
@@ -3630,13 +3652,22 @@ declare namespace tracer {
|
|
|
3630
3652
|
* outputData: { content: 'response', role: 'ai' },
|
|
3631
3653
|
* metadata: { temperature: 0.7 },
|
|
3632
3654
|
* tags: { host: 'localhost' },
|
|
3633
|
-
* metrics: { inputTokens: 10, outputTokens: 20, totalTokens: 30 }
|
|
3655
|
+
* metrics: { inputTokens: 10, outputTokens: 20, totalTokens: 30 },
|
|
3656
|
+
* toolDefinitions: [
|
|
3657
|
+
* {
|
|
3658
|
+
* name: 'get_weather',
|
|
3659
|
+
* description: 'Returns the current weather for a given location.',
|
|
3660
|
+
* schema: { type: 'object', properties: { location: { type: 'string' } }, required: ['location'] },
|
|
3661
|
+
* version: '1.0.0'
|
|
3662
|
+
* },
|
|
3663
|
+
* { name: 'get_time' }
|
|
3664
|
+
* ]
|
|
3634
3665
|
* })
|
|
3635
3666
|
* })
|
|
3636
3667
|
* ```
|
|
3637
3668
|
*
|
|
3638
3669
|
* @param span The span to annotate (defaults to the current LLM Observability span if not provided)
|
|
3639
|
-
* @param options An object containing the inputs, outputs, tags, metadata, and metrics to set on the span.
|
|
3670
|
+
* @param options An object containing the inputs, outputs, tags, metadata, tool definitions, and metrics to set on the span.
|
|
3640
3671
|
*/
|
|
3641
3672
|
annotate (options: llmobs.AnnotationOptions): void
|
|
3642
3673
|
annotate (span: tracer.Span | undefined, options: llmobs.AnnotationOptions): void
|
|
@@ -3691,6 +3722,11 @@ declare namespace tracer {
|
|
|
3691
3722
|
}
|
|
3692
3723
|
|
|
3693
3724
|
interface LLMObservabilitySpan {
|
|
3725
|
+
/**
|
|
3726
|
+
* The span kind
|
|
3727
|
+
*/
|
|
3728
|
+
kind: spanKind,
|
|
3729
|
+
|
|
3694
3730
|
/**
|
|
3695
3731
|
* The input content associated with the span.
|
|
3696
3732
|
*/
|
|
@@ -3867,6 +3903,13 @@ declare namespace tracer {
|
|
|
3867
3903
|
template?: string | Message[]
|
|
3868
3904
|
}
|
|
3869
3905
|
|
|
3906
|
+
interface ToolDefinition {
|
|
3907
|
+
name : string,
|
|
3908
|
+
description? : string,
|
|
3909
|
+
schema? : {[key : string] : any}
|
|
3910
|
+
version? : string
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3870
3913
|
/**
|
|
3871
3914
|
* Annotation options for LLM Observability spans.
|
|
3872
3915
|
*/
|
|
@@ -3902,10 +3945,22 @@ declare namespace tracer {
|
|
|
3902
3945
|
*/
|
|
3903
3946
|
tags?: { [key: string]: any },
|
|
3904
3947
|
|
|
3948
|
+
/**
|
|
3949
|
+
* List of tag keys to propagate to LLM Observability cost and token metrics emitted from this span.
|
|
3950
|
+
* Each key must already be present in `tags` from this call or from a previous annotation on the
|
|
3951
|
+
* same span.
|
|
3952
|
+
*/
|
|
3953
|
+
costTags?: string[],
|
|
3954
|
+
|
|
3905
3955
|
/**
|
|
3906
3956
|
* A Prompt object that represents the prompt used for an LLM call. Only used on `llm` spans.
|
|
3907
3957
|
*/
|
|
3908
3958
|
prompt?: Prompt,
|
|
3959
|
+
/**
|
|
3960
|
+
* A list of ToolDefinition object that represents the tools available to the LLM for this span
|
|
3961
|
+
* Each definition requires a `name` and optionally accepts `description`, `schema`, and `version`.
|
|
3962
|
+
* */
|
|
3963
|
+
toolDefinitions?: ToolDefinition[]
|
|
3909
3964
|
}
|
|
3910
3965
|
|
|
3911
3966
|
interface AnnotationContextOptions {
|
|
@@ -3914,6 +3969,13 @@ declare namespace tracer {
|
|
|
3914
3969
|
*/
|
|
3915
3970
|
tags?: { [key: string]: any },
|
|
3916
3971
|
|
|
3972
|
+
/**
|
|
3973
|
+
* List of tag keys to propagate to LLM Observability cost and token metrics emitted from each span
|
|
3974
|
+
* in the context.
|
|
3975
|
+
* Each key must already be present in `tags` on the span when it starts.
|
|
3976
|
+
*/
|
|
3977
|
+
costTags?: string[],
|
|
3978
|
+
|
|
3917
3979
|
/**
|
|
3918
3980
|
* Set to override the span name for any spans annotated within the returned context.
|
|
3919
3981
|
*/
|
|
@@ -4013,6 +4075,15 @@ declare namespace tracer {
|
|
|
4013
4075
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
4014
4076
|
*/
|
|
4015
4077
|
agentlessEnabled?: boolean,
|
|
4078
|
+
|
|
4079
|
+
/**
|
|
4080
|
+
* The proportion of LLM Observability traces to sample, between `0` and `1` (inclusive).
|
|
4081
|
+
* The decision is computed once per trace, propagated across services, and recorded on every
|
|
4082
|
+
* span; spans are always sent and the decision is honored at ingestion time. Defaults to `1`.
|
|
4083
|
+
* @env DD_LLMOBS_SAMPLE_RATE
|
|
4084
|
+
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
4085
|
+
*/
|
|
4086
|
+
sampleRate?: number,
|
|
4016
4087
|
}
|
|
4017
4088
|
|
|
4018
4089
|
/** @hidden */
|