dd-trace 5.80.0 → 5.82.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 +79 -88
- package/ext/tags.d.ts +1 -0
- package/ext/tags.js +1 -0
- package/index.d.ts +42 -35
- package/loader-hook.mjs +16 -4
- package/package.json +33 -56
- package/packages/datadog-core/src/utils/src/parse-tags.js +1 -1
- package/packages/datadog-esbuild/index.js +44 -26
- package/packages/datadog-esbuild/src/utils.js +14 -2
- package/packages/datadog-instrumentations/index.js +1 -0
- package/packages/datadog-instrumentations/src/aerospike.js +3 -2
- package/packages/datadog-instrumentations/src/ai.js +2 -2
- package/packages/datadog-instrumentations/src/amqp10.js +1 -1
- package/packages/datadog-instrumentations/src/amqplib.js +4 -4
- package/packages/datadog-instrumentations/src/anthropic.js +14 -2
- package/packages/datadog-instrumentations/src/apollo-server-core.js +2 -2
- package/packages/datadog-instrumentations/src/apollo-server.js +1 -1
- package/packages/datadog-instrumentations/src/apollo.js +3 -2
- package/packages/datadog-instrumentations/src/avsc.js +1 -1
- package/packages/datadog-instrumentations/src/aws-sdk.js +6 -2
- package/packages/datadog-instrumentations/src/azure-event-hubs.js +4 -3
- package/packages/datadog-instrumentations/src/azure-functions.js +2 -2
- package/packages/datadog-instrumentations/src/azure-service-bus.js +3 -4
- package/packages/datadog-instrumentations/src/bluebird.js +1 -1
- package/packages/datadog-instrumentations/src/bullmq.js +11 -0
- package/packages/datadog-instrumentations/src/bunyan.js +1 -1
- package/packages/datadog-instrumentations/src/cassandra-driver.js +1 -1
- package/packages/datadog-instrumentations/src/child_process.js +2 -2
- package/packages/datadog-instrumentations/src/confluentinc-kafka-javascript.js +3 -3
- package/packages/datadog-instrumentations/src/couchbase.js +1 -1
- package/packages/datadog-instrumentations/src/crypto.js +1 -1
- package/packages/datadog-instrumentations/src/cucumber.js +12 -13
- package/packages/datadog-instrumentations/src/cypress.js +1 -1
- package/packages/datadog-instrumentations/src/dns.js +1 -1
- package/packages/datadog-instrumentations/src/elasticsearch.js +1 -1
- package/packages/datadog-instrumentations/src/express-mongo-sanitize.js +1 -1
- package/packages/datadog-instrumentations/src/express.js +1 -1
- package/packages/datadog-instrumentations/src/find-my-way.js +6 -5
- package/packages/datadog-instrumentations/src/fs.js +1 -1
- package/packages/datadog-instrumentations/src/generic-pool.js +1 -1
- package/packages/datadog-instrumentations/src/google-cloud-pubsub.js +137 -15
- package/packages/datadog-instrumentations/src/google-cloud-vertexai.js +2 -3
- package/packages/datadog-instrumentations/src/google-genai.js +120 -0
- package/packages/datadog-instrumentations/src/graphql.js +21 -1
- package/packages/datadog-instrumentations/src/grpc/client.js +1 -1
- package/packages/datadog-instrumentations/src/grpc/server.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/bundler-register.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/hook.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/hooks.js +5 -1
- package/packages/datadog-instrumentations/src/helpers/instrument.js +11 -1
- package/packages/datadog-instrumentations/src/helpers/register.js +12 -5
- package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +27 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +152 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/bullmq.json +106 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +6 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langchain.js +237 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.js +9 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.mjs +11 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +139 -0
- package/packages/datadog-instrumentations/src/helpers/router-helper.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/shared-utils.js +9 -0
- package/packages/datadog-instrumentations/src/hono.js +55 -10
- package/packages/datadog-instrumentations/src/ioredis.js +1 -1
- package/packages/datadog-instrumentations/src/iovalkey.js +1 -1
- package/packages/datadog-instrumentations/src/jest.js +2 -2
- package/packages/datadog-instrumentations/src/kafkajs.js +3 -3
- package/packages/datadog-instrumentations/src/knex.js +1 -1
- package/packages/datadog-instrumentations/src/langchain.js +3 -109
- package/packages/datadog-instrumentations/src/ldapjs.js +1 -1
- package/packages/datadog-instrumentations/src/light-my-request.js +93 -0
- package/packages/datadog-instrumentations/src/limitd-client.js +1 -1
- package/packages/datadog-instrumentations/src/lodash.js +1 -2
- package/packages/datadog-instrumentations/src/mariadb.js +1 -2
- package/packages/datadog-instrumentations/src/memcached.js +1 -1
- package/packages/datadog-instrumentations/src/mocha/main.js +1 -1
- package/packages/datadog-instrumentations/src/mongodb-core.js +1 -1
- package/packages/datadog-instrumentations/src/mongodb.js +1 -1
- package/packages/datadog-instrumentations/src/mongoose.js +1 -1
- package/packages/datadog-instrumentations/src/mquery.js +1 -1
- package/packages/datadog-instrumentations/src/mysql.js +1 -1
- package/packages/datadog-instrumentations/src/mysql2.js +2 -2
- package/packages/datadog-instrumentations/src/net.js +1 -1
- package/packages/datadog-instrumentations/src/next.js +1 -1
- package/packages/datadog-instrumentations/src/nyc.js +1 -1
- package/packages/datadog-instrumentations/src/openai.js +2 -2
- package/packages/datadog-instrumentations/src/opensearch.js +1 -1
- package/packages/datadog-instrumentations/src/oracledb.js +1 -1
- package/packages/datadog-instrumentations/src/otel-sdk-trace.js +1 -1
- package/packages/datadog-instrumentations/src/pg.js +3 -3
- package/packages/datadog-instrumentations/src/pino.js +1 -1
- package/packages/datadog-instrumentations/src/playwright.js +46 -17
- package/packages/datadog-instrumentations/src/prisma.js +52 -37
- package/packages/datadog-instrumentations/src/process.js +1 -1
- package/packages/datadog-instrumentations/src/promise-js.js +1 -1
- package/packages/datadog-instrumentations/src/promise.js +1 -1
- package/packages/datadog-instrumentations/src/protobufjs.js +1 -1
- package/packages/datadog-instrumentations/src/q.js +1 -1
- package/packages/datadog-instrumentations/src/redis.js +1 -1
- package/packages/datadog-instrumentations/src/rhea.js +1 -1
- package/packages/datadog-instrumentations/src/router.js +1 -1
- package/packages/datadog-instrumentations/src/selenium.js +4 -2
- package/packages/datadog-instrumentations/src/sequelize.js +1 -2
- package/packages/datadog-instrumentations/src/sharedb.js +1 -1
- package/packages/datadog-instrumentations/src/tedious.js +1 -1
- package/packages/datadog-instrumentations/src/undici.js +4 -4
- package/packages/datadog-instrumentations/src/url.js +1 -1
- package/packages/datadog-instrumentations/src/vitest.js +1 -1
- package/packages/datadog-instrumentations/src/vm.js +1 -1
- package/packages/datadog-instrumentations/src/when.js +1 -1
- package/packages/datadog-instrumentations/src/winston.js +1 -1
- package/packages/datadog-instrumentations/src/ws.js +38 -19
- package/packages/datadog-plugin-amqp10/src/index.js +1 -1
- package/packages/datadog-plugin-amqplib/src/index.js +1 -1
- package/packages/datadog-plugin-anthropic/src/index.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/index.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +4 -4
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +2 -2
- package/packages/datadog-plugin-aws-sdk/src/util.js +3 -3
- package/packages/datadog-plugin-azure-event-hubs/src/index.js +1 -1
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +19 -5
- package/packages/datadog-plugin-azure-service-bus/src/index.js +1 -1
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +4 -0
- package/packages/datadog-plugin-bullmq/src/consumer.js +60 -0
- package/packages/datadog-plugin-bullmq/src/index.js +18 -0
- package/packages/datadog-plugin-bullmq/src/producer.js +178 -0
- package/packages/datadog-plugin-child_process/src/scrub-cmd-params.js +1 -1
- package/packages/datadog-plugin-confluentinc-kafka-javascript/src/index.js +1 -1
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +23 -2
- package/packages/datadog-plugin-cypress/src/plugin.js +2 -2
- package/packages/datadog-plugin-cypress/src/support.js +73 -31
- package/packages/datadog-plugin-express/src/index.js +1 -1
- package/packages/datadog-plugin-fastify/src/index.js +1 -1
- package/packages/datadog-plugin-google-cloud-pubsub/src/client.js +13 -3
- package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +171 -12
- package/packages/datadog-plugin-google-cloud-pubsub/src/index.js +1 -2
- package/packages/datadog-plugin-google-cloud-pubsub/src/producer.js +160 -13
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +217 -0
- package/packages/datadog-plugin-google-cloud-vertexai/src/index.js +1 -1
- package/packages/datadog-plugin-google-genai/src/index.js +17 -0
- package/packages/datadog-plugin-google-genai/src/tracing.js +41 -0
- package/packages/datadog-plugin-graphql/src/resolve.js +1 -1
- package/packages/datadog-plugin-graphql/src/tools/transforms.js +5 -4
- package/packages/datadog-plugin-grpc/src/index.js +1 -1
- package/packages/datadog-plugin-http/src/client.js +2 -1
- package/packages/datadog-plugin-http/src/index.js +25 -5
- package/packages/datadog-plugin-http2/src/client.js +2 -2
- package/packages/datadog-plugin-http2/src/index.js +1 -1
- package/packages/datadog-plugin-jest/src/util.js +1 -1
- package/packages/datadog-plugin-kafkajs/src/index.js +1 -1
- package/packages/datadog-plugin-langchain/src/index.js +1 -1
- package/packages/datadog-plugin-langchain/src/tracing.js +7 -3
- package/packages/datadog-plugin-moleculer/src/index.js +1 -1
- package/packages/datadog-plugin-mongodb-core/src/index.js +6 -2
- package/packages/datadog-plugin-next/src/index.js +11 -3
- package/packages/datadog-plugin-openai/src/index.js +1 -1
- package/packages/datadog-plugin-openai/src/stream-helpers.js +30 -10
- package/packages/datadog-plugin-openai/src/tracing.js +2 -2
- package/packages/datadog-plugin-rhea/src/index.js +1 -1
- package/packages/datadog-plugin-ws/src/close.js +56 -3
- package/packages/datadog-plugin-ws/src/index.js +4 -0
- package/packages/datadog-plugin-ws/src/producer.js +39 -4
- package/packages/datadog-plugin-ws/src/receiver.js +39 -3
- package/packages/datadog-plugin-ws/src/server.js +13 -1
- package/packages/datadog-plugin-ws/src/util.js +107 -0
- package/packages/datadog-shimmer/src/shimmer.js +2 -2
- package/packages/dd-trace/src/aiguard/sdk.js +21 -13
- package/packages/dd-trace/src/appsec/api_security_sampler.js +1 -1
- package/packages/dd-trace/src/appsec/graphql.js +2 -2
- package/packages/dd-trace/src/appsec/iast/analyzers/code-injection-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/command-injection-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/cookie-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-base-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/injection-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/ldap-injection-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/nosql-injection-mongodb-analyzer.js +3 -3
- package/packages/dd-trace/src/appsec/iast/analyzers/path-traversal-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/ssrf-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/untrusted-deserialization-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/unvalidated-redirect-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/weak-cipher-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/weak-hash-analyzer.js +3 -2
- package/packages/dd-trace/src/appsec/iast/analyzers/weak-randomness-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/iast-plugin.js +3 -3
- package/packages/dd-trace/src/appsec/iast/index.js +5 -5
- package/packages/dd-trace/src/appsec/iast/overhead-controller.js +1 -1
- package/packages/dd-trace/src/appsec/iast/security-controls/index.js +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/index.js +1 -2
- package/packages/dd-trace/src/appsec/iast/taint-tracking/operations-taint-object.js +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/plugin.js +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +11 -16
- package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +1 -1
- package/packages/dd-trace/src/appsec/iast/telemetry/namespaces.js +1 -1
- package/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +4 -4
- package/packages/dd-trace/src/appsec/index.js +8 -8
- package/packages/dd-trace/src/appsec/rasp/command_injection.js +1 -1
- package/packages/dd-trace/src/appsec/rasp/index.js +1 -1
- package/packages/dd-trace/src/appsec/rasp/lfi.js +1 -1
- package/packages/dd-trace/src/appsec/rc-products.js +10 -0
- package/packages/dd-trace/src/appsec/recommended.json +230 -3
- package/packages/dd-trace/src/appsec/remote_config.js +177 -0
- package/packages/dd-trace/src/appsec/reporter.js +3 -7
- package/packages/dd-trace/src/appsec/rule_manager.js +37 -20
- package/packages/dd-trace/src/appsec/sdk/index.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/set_user.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/track_event.js +2 -2
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +2 -2
- package/packages/dd-trace/src/appsec/user_tracking.js +2 -2
- package/packages/dd-trace/src/appsec/waf/index.js +17 -3
- package/packages/dd-trace/src/appsec/waf/waf_manager.js +11 -0
- package/packages/dd-trace/src/azure_metadata.js +8 -2
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +8 -6
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +1 -1
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +1 -1
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +4 -2
- package/packages/dd-trace/src/config/remote_config.js +34 -0
- package/packages/dd-trace/src/config.js +109 -34
- package/packages/dd-trace/src/config_defaults.js +16 -3
- package/packages/dd-trace/src/constants.js +5 -0
- package/packages/dd-trace/src/crashtracking/crashtracker.js +10 -1
- package/packages/dd-trace/src/datastreams/checkpointer.js +2 -2
- package/packages/dd-trace/src/datastreams/encoding.js +23 -6
- package/packages/dd-trace/src/datastreams/index.js +1 -1
- package/packages/dd-trace/src/datastreams/pathway.js +41 -2
- package/packages/dd-trace/src/datastreams/processor.js +3 -3
- package/packages/dd-trace/src/datastreams/schemas/schema_builder.js +1 -1
- package/packages/dd-trace/src/datastreams/writer.js +2 -2
- package/packages/dd-trace/src/debugger/config.js +1 -0
- package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +15 -5
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/config.js +3 -1
- package/packages/dd-trace/src/debugger/devtools_client/index.js +37 -17
- package/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js +2 -0
- package/packages/dd-trace/src/debugger/devtools_client/json-buffer.js +24 -18
- package/packages/dd-trace/src/debugger/devtools_client/send.js +21 -11
- package/packages/dd-trace/src/debugger/devtools_client/session.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/collector.js +103 -15
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/constants.js +25 -0
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/index.js +56 -25
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/processor.js +64 -23
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js +3 -1
- package/packages/dd-trace/src/debugger/devtools_client/snapshot-pruner.js +404 -0
- package/packages/dd-trace/src/debugger/devtools_client/source-maps.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/state.js +8 -3
- package/packages/dd-trace/src/debugger/devtools_client/status.js +3 -3
- package/packages/dd-trace/src/debugger/index.js +2 -2
- package/packages/dd-trace/src/dogstatsd.js +3 -2
- package/packages/dd-trace/src/encode/0.4.js +1 -1
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +2 -2
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +1 -1
- package/packages/dd-trace/src/encode/span-stats.js +13 -2
- package/packages/dd-trace/src/exporter.js +2 -2
- package/packages/dd-trace/src/exporters/agent/index.js +1 -1
- package/packages/dd-trace/src/exporters/common/agent-info-exporter.js +1 -1
- package/packages/dd-trace/src/exporters/common/request.js +2 -2
- package/packages/dd-trace/src/exporters/common/writer.js +1 -1
- package/packages/dd-trace/src/exporters/span-stats/index.js +1 -1
- package/packages/dd-trace/src/external-logger/src/index.js +1 -2
- package/packages/dd-trace/src/flare/index.js +1 -1
- package/packages/dd-trace/src/guardrails/index.js +6 -3
- package/packages/dd-trace/src/histogram.js +1 -1
- package/packages/dd-trace/src/id.js +60 -0
- package/packages/dd-trace/src/index.js +1 -1
- package/packages/dd-trace/src/lambda/handler.js +4 -4
- package/packages/dd-trace/src/lambda/index.js +1 -1
- package/packages/dd-trace/src/lambda/runtime/patch.js +4 -4
- package/packages/dd-trace/src/lambda/runtime/ritm.js +2 -2
- package/packages/dd-trace/src/llmobs/constants/tags.js +8 -1
- package/packages/dd-trace/src/llmobs/index.js +8 -9
- package/packages/dd-trace/src/llmobs/plugins/ai/index.js +38 -7
- package/packages/dd-trace/src/llmobs/plugins/ai/util.js +30 -9
- package/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js +3 -3
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +104 -0
- package/packages/dd-trace/src/llmobs/plugins/genai/util.js +486 -0
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/chain.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/chat_model.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/embedding.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/llm.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/vectorstore.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +2 -2
- package/packages/dd-trace/src/llmobs/plugins/openai/constants.js +16 -0
- package/packages/dd-trace/src/llmobs/plugins/{openai.js → openai/index.js} +63 -6
- package/packages/dd-trace/src/llmobs/plugins/openai/utils.js +126 -0
- package/packages/dd-trace/src/llmobs/plugins/vertexai.js +1 -1
- package/packages/dd-trace/src/llmobs/sdk.js +20 -22
- package/packages/dd-trace/src/llmobs/span_processor.js +15 -14
- package/packages/dd-trace/src/llmobs/tagger.js +4 -0
- package/packages/dd-trace/src/llmobs/telemetry.js +3 -4
- package/packages/dd-trace/src/llmobs/writers/base.js +2 -2
- package/packages/dd-trace/src/llmobs/writers/spans.js +1 -2
- package/packages/dd-trace/src/log/index.js +1 -1
- package/packages/dd-trace/src/noop/proxy.js +2 -2
- package/packages/dd-trace/src/noop/span.js +1 -1
- package/packages/dd-trace/src/openfeature/index.js +2 -2
- package/packages/dd-trace/src/openfeature/noop.js +14 -14
- package/packages/dd-trace/src/openfeature/remote_config.js +31 -0
- package/packages/dd-trace/src/openfeature/writers/base.js +5 -5
- package/packages/dd-trace/src/openfeature/writers/exposures.js +9 -9
- package/packages/dd-trace/src/opentelemetry/context_manager.js +2 -2
- package/packages/dd-trace/src/opentelemetry/logs/index.js +2 -2
- package/packages/dd-trace/src/opentelemetry/logs/logger.js +3 -2
- package/packages/dd-trace/src/opentelemetry/logs/logger_provider.js +4 -4
- package/packages/dd-trace/src/opentelemetry/logs/otlp_http_log_exporter.js +5 -3
- package/packages/dd-trace/src/opentelemetry/logs/otlp_transformer.js +17 -16
- package/packages/dd-trace/src/opentelemetry/metrics/constants.js +34 -0
- package/packages/dd-trace/src/opentelemetry/metrics/index.js +81 -0
- package/packages/dd-trace/src/opentelemetry/metrics/instruments.js +225 -0
- package/packages/dd-trace/src/opentelemetry/metrics/meter.js +171 -0
- package/packages/dd-trace/src/opentelemetry/metrics/meter_provider.js +54 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_http_metric_exporter.js +62 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_transformer.js +251 -0
- package/packages/dd-trace/src/opentelemetry/metrics/periodic_metric_reader.js +557 -0
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +10 -18
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_transformer_base.js +47 -32
- package/packages/dd-trace/src/opentelemetry/otlp/protobuf_loader.js +1 -1
- package/packages/dd-trace/src/opentelemetry/span.js +3 -3
- package/packages/dd-trace/src/opentelemetry/tracer.js +4 -4
- package/packages/dd-trace/src/opentelemetry/tracer_provider.js +1 -1
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +24 -8
- package/packages/dd-trace/src/opentracing/span.js +3 -3
- package/packages/dd-trace/src/opentracing/tracer.js +5 -5
- package/packages/dd-trace/src/payload-tagging/index.js +8 -4
- package/packages/dd-trace/src/plugin_manager.js +5 -3
- package/packages/dd-trace/src/plugins/apollo.js +1 -1
- package/packages/dd-trace/src/plugins/ci_plugin.js +27 -27
- package/packages/dd-trace/src/plugins/database.js +1 -1
- package/packages/dd-trace/src/plugins/index.js +6 -1
- package/packages/dd-trace/src/plugins/log_plugin.js +1 -1
- package/packages/dd-trace/src/plugins/outbound.js +1 -1
- package/packages/dd-trace/src/plugins/tracing.js +1 -1
- package/packages/dd-trace/src/plugins/util/ci.js +1 -1
- package/packages/dd-trace/src/plugins/util/git.js +8 -8
- package/packages/dd-trace/src/plugins/util/stacktrace.js +1 -1
- package/packages/dd-trace/src/plugins/util/test.js +27 -27
- package/packages/dd-trace/src/plugins/util/url.js +119 -1
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +1 -1
- package/packages/dd-trace/src/plugins/util/web.js +18 -46
- package/packages/dd-trace/src/priority_sampler.js +15 -16
- package/packages/dd-trace/src/process-tags/index.js +83 -0
- package/packages/dd-trace/src/profiling/config.js +33 -22
- package/packages/dd-trace/src/profiling/exporter_cli.js +4 -4
- package/packages/dd-trace/src/profiling/exporters/agent.js +5 -5
- package/packages/dd-trace/src/profiling/index.js +1 -1
- package/packages/dd-trace/src/profiling/libuv-size.js +1 -1
- package/packages/dd-trace/src/profiling/profiler.js +4 -5
- package/packages/dd-trace/src/profiling/profilers/event_plugins/event.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/events.js +11 -2
- package/packages/dd-trace/src/profiling/profilers/wall.js +4 -4
- package/packages/dd-trace/src/proxy.js +17 -18
- package/packages/dd-trace/src/rate_limiter.js +1 -1
- package/packages/dd-trace/src/remote_config/index.js +541 -137
- package/packages/dd-trace/src/require-package-json.js +1 -1
- package/packages/dd-trace/src/ritm.js +50 -27
- package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +1 -1
- package/packages/dd-trace/src/serverless.js +16 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/web.js +4 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/web.js +4 -0
- package/packages/dd-trace/src/span_format.js +10 -5
- package/packages/dd-trace/src/span_processor.js +8 -3
- package/packages/dd-trace/src/span_stats.js +21 -8
- package/packages/dd-trace/src/spanleak.js +1 -1
- package/packages/dd-trace/src/standalone/index.js +1 -1
- package/packages/dd-trace/src/startup-log.js +3 -3
- package/packages/dd-trace/src/supported-configurations.json +16 -0
- package/packages/dd-trace/src/telemetry/dependencies.js +4 -4
- package/packages/dd-trace/src/telemetry/endpoints.js +8 -8
- package/packages/dd-trace/src/telemetry/logs/index.js +1 -1
- package/packages/dd-trace/src/telemetry/telemetry.js +22 -8
- package/packages/dd-trace/src/tracer.js +3 -3
- package/packages/dd-trace/src/tracer_metadata.js +19 -15
- package/vendor/dist/@datadog/sketches-js/LICENSE +39 -0
- package/vendor/dist/@datadog/sketches-js/index.js +1 -0
- package/vendor/dist/@datadog/source-map/LICENSE +28 -0
- package/vendor/dist/@datadog/source-map/index.js +1 -0
- package/vendor/dist/@isaacs/ttlcache/LICENSE +55 -0
- package/vendor/dist/@isaacs/ttlcache/index.js +1 -0
- package/vendor/dist/@opentelemetry/core/LICENSE +201 -0
- package/vendor/dist/@opentelemetry/core/index.js +1 -0
- package/vendor/dist/@opentelemetry/resources/LICENSE +201 -0
- package/vendor/dist/@opentelemetry/resources/index.js +1 -0
- package/vendor/dist/astring/LICENSE +19 -0
- package/vendor/dist/astring/index.js +1 -0
- package/vendor/dist/crypto-randomuuid/index.js +1 -0
- package/vendor/dist/escape-string-regexp/LICENSE +9 -0
- package/vendor/dist/escape-string-regexp/index.js +1 -0
- package/vendor/dist/esquery/LICENSE +24 -0
- package/vendor/dist/esquery/index.js +1 -0
- package/vendor/dist/ignore/LICENSE +21 -0
- package/vendor/dist/ignore/index.js +1 -0
- package/vendor/dist/istanbul-lib-coverage/LICENSE +24 -0
- package/vendor/dist/istanbul-lib-coverage/index.js +1 -0
- package/vendor/dist/jest-docblock/LICENSE +21 -0
- package/vendor/dist/jest-docblock/index.js +1 -0
- package/vendor/dist/jsonpath-plus/LICENSE +22 -0
- package/vendor/dist/jsonpath-plus/index.js +1 -0
- package/vendor/dist/limiter/LICENSE +19 -0
- package/vendor/dist/limiter/index.js +1 -0
- package/vendor/dist/lodash.sortby/LICENSE +47 -0
- package/vendor/dist/lodash.sortby/index.js +1 -0
- package/vendor/dist/lru-cache/LICENSE +15 -0
- package/vendor/dist/lru-cache/index.js +1 -0
- package/vendor/dist/meriyah/LICENSE +7 -0
- package/vendor/dist/meriyah/index.js +1 -0
- package/vendor/dist/module-details-from-path/LICENSE +21 -0
- package/vendor/dist/module-details-from-path/index.js +1 -0
- package/vendor/dist/mutexify/promise/LICENSE +21 -0
- package/vendor/dist/mutexify/promise/index.js +1 -0
- package/vendor/dist/opentracing/LICENSE +201 -0
- package/vendor/dist/opentracing/binary_carrier.d.ts +11 -0
- package/vendor/dist/opentracing/constants.d.ts +61 -0
- package/vendor/dist/opentracing/examples/demo/demo.d.ts +2 -0
- package/vendor/dist/opentracing/ext/tags.d.ts +90 -0
- package/vendor/dist/opentracing/functions.d.ts +20 -0
- package/vendor/dist/opentracing/global_tracer.d.ts +14 -0
- package/vendor/dist/opentracing/index.d.ts +12 -0
- package/vendor/dist/opentracing/index.js +1 -0
- package/vendor/dist/opentracing/mock_tracer/index.d.ts +5 -0
- package/vendor/dist/opentracing/mock_tracer/mock_context.d.ts +13 -0
- package/vendor/dist/opentracing/mock_tracer/mock_report.d.ts +16 -0
- package/vendor/dist/opentracing/mock_tracer/mock_span.d.ts +50 -0
- package/vendor/dist/opentracing/mock_tracer/mock_tracer.d.ts +26 -0
- package/vendor/dist/opentracing/noop.d.ts +8 -0
- package/vendor/dist/opentracing/reference.d.ts +33 -0
- package/vendor/dist/opentracing/span.d.ts +147 -0
- package/vendor/dist/opentracing/span_context.d.ts +26 -0
- package/vendor/dist/opentracing/test/api_compatibility.d.ts +16 -0
- package/vendor/dist/opentracing/test/mocktracer_implemenation.d.ts +3 -0
- package/vendor/dist/opentracing/test/noop_implementation.d.ts +4 -0
- package/vendor/dist/opentracing/test/opentracing_api.d.ts +3 -0
- package/vendor/dist/opentracing/test/unittest.d.ts +2 -0
- package/vendor/dist/opentracing/tracer.d.ts +127 -0
- package/vendor/dist/path-to-regexp/LICENSE +21 -0
- package/vendor/dist/path-to-regexp/index.js +1 -0
- package/vendor/dist/pprof-format/LICENSE +8 -0
- package/vendor/dist/pprof-format/index.js +1 -0
- package/vendor/dist/protobufjs/LICENSE +39 -0
- package/vendor/dist/protobufjs/index.js +1 -0
- package/vendor/dist/protobufjs/minimal/LICENSE +39 -0
- package/vendor/dist/protobufjs/minimal/index.js +1 -0
- package/vendor/dist/retry/LICENSE +21 -0
- package/vendor/dist/retry/index.js +1 -0
- package/vendor/dist/rfdc/LICENSE +15 -0
- package/vendor/dist/rfdc/index.js +1 -0
- package/vendor/dist/semifies/LICENSE +201 -0
- package/vendor/dist/semifies/index.js +1 -0
- package/vendor/dist/shell-quote/LICENSE +24 -0
- package/vendor/dist/shell-quote/index.js +1 -0
- package/vendor/dist/source-map/LICENSE +28 -0
- package/vendor/dist/source-map/index.js +1 -0
- package/vendor/dist/source-map/lib/util/LICENSE +28 -0
- package/vendor/dist/source-map/lib/util/index.js +1 -0
- package/vendor/dist/source-map/mappings.wasm +0 -0
- package/vendor/dist/tlhunter-sorted-set/LICENSE +21 -0
- package/vendor/dist/tlhunter-sorted-set/index.js +1 -0
- package/vendor/dist/ttl-set/LICENSE +21 -0
- package/vendor/dist/ttl-set/index.js +1 -0
- package/packages/dd-trace/src/remote_config/manager.js +0 -368
|
@@ -12,7 +12,7 @@ const fs = require('fs')
|
|
|
12
12
|
* @typedef { import('module').Module } Module
|
|
13
13
|
* @param {string} name
|
|
14
14
|
* @param {Module} module
|
|
15
|
-
* @returns {
|
|
15
|
+
* @returns {object} The parsed package.json
|
|
16
16
|
*/
|
|
17
17
|
function requirePackageJson (name, module) {
|
|
18
18
|
if (path.isAbsolute(name)) {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const path = require('path')
|
|
4
|
+
const fs = require('fs')
|
|
4
5
|
const Module = require('module')
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
const dc = require('dc-polyfill')
|
|
8
|
+
|
|
9
|
+
const parse = require('../../../vendor/dist/module-details-from-path')
|
|
7
10
|
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
|
|
11
|
+
const { isRelativeRequire } = require('../../datadog-instrumentations/src/helpers/shared-utils')
|
|
8
12
|
|
|
9
13
|
const origRequire = Module.prototype.require
|
|
10
|
-
|
|
11
14
|
// derived from require-in-the-middle@3 with tweaks
|
|
12
15
|
|
|
13
16
|
module.exports = Hook
|
|
@@ -64,7 +67,6 @@ function Hook (modules, options, onrequire) {
|
|
|
64
67
|
} catch {
|
|
65
68
|
return _origRequire.apply(this, arguments)
|
|
66
69
|
}
|
|
67
|
-
|
|
68
70
|
const core = !filename.includes(path.sep)
|
|
69
71
|
let name, basedir, hooks
|
|
70
72
|
// return known patched modules immediately
|
|
@@ -117,32 +119,41 @@ function Hook (modules, options, onrequire) {
|
|
|
117
119
|
// decide how to assign the stat
|
|
118
120
|
// first case will only happen when patching an AWS Lambda Handler
|
|
119
121
|
const stat = inAWSLambda && hasLambdaHandler && !filenameFromNodeModule ? { name: filename } : parse(filename)
|
|
120
|
-
if (!stat) return exports // abort if filename could not be parsed
|
|
121
|
-
name = stat.name
|
|
122
|
-
basedir = stat.basedir
|
|
123
|
-
|
|
124
|
-
hooks = moduleHooks[name]
|
|
125
|
-
if (!hooks) return exports // abort if module name isn't on whitelist
|
|
126
|
-
|
|
127
|
-
// figure out if this is the main module file, or a file inside the module
|
|
128
|
-
const paths = Module._resolveLookupPaths(name, this, true)
|
|
129
|
-
if (!paths) {
|
|
130
|
-
// abort if _resolveLookupPaths return null
|
|
131
|
-
return exports
|
|
132
|
-
}
|
|
133
122
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
if (stat) {
|
|
124
|
+
name = stat.name
|
|
125
|
+
basedir = stat.basedir
|
|
126
|
+
|
|
127
|
+
hooks = moduleHooks[name]
|
|
128
|
+
if (!hooks) return exports // abort if module name isn't on whitelist
|
|
129
|
+
|
|
130
|
+
const paths = Module._resolveLookupPaths(name, this, true)
|
|
131
|
+
if (!paths) {
|
|
132
|
+
// abort if _resolveLookupPaths return null
|
|
133
|
+
return exports
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
let res
|
|
137
|
+
try {
|
|
138
|
+
res = Module._findPath(name, [basedir, ...paths])
|
|
139
|
+
} catch {
|
|
140
|
+
// case where the file specified in package.json "main" doesn't exist
|
|
141
|
+
// in this case, the file is treated as module-internal
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (!res || res !== filename) {
|
|
145
|
+
// this is a module-internal file
|
|
146
|
+
// use the module-relative path to the file, prefixed by original module name
|
|
147
|
+
name = name + path.sep + path.relative(basedir, filename)
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
if (isRelativeRequire(request) && moduleHooks[request]) {
|
|
151
|
+
hooks = moduleHooks[request]
|
|
152
|
+
name = request
|
|
153
|
+
basedir = findProjectRoot(filename)
|
|
154
|
+
}
|
|
141
155
|
|
|
142
|
-
|
|
143
|
-
// this is a module-internal file
|
|
144
|
-
// use the module-relative path to the file, prefixed by original module name
|
|
145
|
-
name = name + path.sep + path.relative(basedir, filename)
|
|
156
|
+
if (!hooks) return exports
|
|
146
157
|
}
|
|
147
158
|
}
|
|
148
159
|
|
|
@@ -167,6 +178,18 @@ Hook.reset = function () {
|
|
|
167
178
|
moduleHooks = Object.create(null)
|
|
168
179
|
}
|
|
169
180
|
|
|
181
|
+
function findProjectRoot (startDir) {
|
|
182
|
+
let dir = startDir
|
|
183
|
+
|
|
184
|
+
while (!fs.existsSync(path.join(dir, 'package.json'))) {
|
|
185
|
+
const parent = path.dirname(dir)
|
|
186
|
+
if (parent === dir) break
|
|
187
|
+
dir = parent
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return dir
|
|
191
|
+
}
|
|
192
|
+
|
|
170
193
|
Hook.prototype.unhook = function () {
|
|
171
194
|
for (const mod of this.modules) {
|
|
172
195
|
const hooks = (moduleHooks[mod] || []).filter(hook => hook !== this.onrequire)
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
const v8 = require('v8')
|
|
6
6
|
const os = require('os')
|
|
7
7
|
const process = require('process')
|
|
8
|
+
const { performance, PerformanceObserver, monitorEventLoopDelay } = require('perf_hooks')
|
|
8
9
|
const { DogStatsDClient, MetricsAggregationClient } = require('../dogstatsd')
|
|
9
10
|
const log = require('../log')
|
|
10
|
-
const { performance, PerformanceObserver, monitorEventLoopDelay } = require('perf_hooks')
|
|
11
11
|
const { getEnvironmentVariable } = require('../config-helper')
|
|
12
12
|
|
|
13
13
|
const { NODE_MAJOR } = require('../../../../version')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const { getEnvironmentVariable } = require('./config-helper')
|
|
4
|
+
const { isFalse } = require('./util')
|
|
4
5
|
|
|
5
6
|
function getIsGCPFunction () {
|
|
6
7
|
const isDeprecatedGCPFunction =
|
|
@@ -13,6 +14,15 @@ function getIsGCPFunction () {
|
|
|
13
14
|
return isDeprecatedGCPFunction || isNewerGCPFunction
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Enable GCP Pub/Sub PUSH subscription tracing for Cloud Run (K_SERVICE present).
|
|
19
|
+
* PUSH: GCP sends HTTP POST requests to the service with message data in headers.
|
|
20
|
+
*/
|
|
21
|
+
function enableGCPPubSubPushSubscription () {
|
|
22
|
+
const isGCPPubSubPushSubscriptionEnabled = getEnvironmentVariable('DD_TRACE_GCP_PUBSUB_PUSH_ENABLED')
|
|
23
|
+
return getEnvironmentVariable('K_SERVICE') !== undefined && !isFalse(isGCPPubSubPushSubscriptionEnabled)
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
function getIsAzureFunction () {
|
|
17
27
|
const isAzureFunction =
|
|
18
28
|
getEnvironmentVariable('FUNCTIONS_EXTENSION_VERSION') !== undefined &&
|
|
@@ -21,6 +31,10 @@ function getIsAzureFunction () {
|
|
|
21
31
|
return isAzureFunction
|
|
22
32
|
}
|
|
23
33
|
|
|
34
|
+
function getIsFlexConsumptionAzureFunction () {
|
|
35
|
+
return getIsAzureFunction() && getEnvironmentVariable('WEBSITE_SKU') === 'FlexConsumption'
|
|
36
|
+
}
|
|
37
|
+
|
|
24
38
|
function isInServerlessEnvironment () {
|
|
25
39
|
const inAWSLambda = getEnvironmentVariable('AWS_LAMBDA_FUNCTION_NAME') !== undefined
|
|
26
40
|
const isGCPFunction = getIsGCPFunction()
|
|
@@ -32,5 +46,7 @@ function isInServerlessEnvironment () {
|
|
|
32
46
|
module.exports = {
|
|
33
47
|
getIsGCPFunction,
|
|
34
48
|
getIsAzureFunction,
|
|
49
|
+
enableGCPPubSubPushSubscription,
|
|
50
|
+
getIsFlexConsumptionAzureFunction,
|
|
35
51
|
isInServerlessEnvironment
|
|
36
52
|
}
|
|
@@ -47,6 +47,10 @@ const messaging = {
|
|
|
47
47
|
sns: {
|
|
48
48
|
opName: () => 'aws.request',
|
|
49
49
|
serviceName: awsServiceV0
|
|
50
|
+
},
|
|
51
|
+
bullmq: {
|
|
52
|
+
opName: () => 'bullmq.add',
|
|
53
|
+
serviceName: ({ tracerService }) => `${tracerService}-bullmq`
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
consumer: {
|
|
@@ -77,6 +81,10 @@ const messaging = {
|
|
|
77
81
|
sqs: {
|
|
78
82
|
opName: () => 'aws.request',
|
|
79
83
|
serviceName: awsServiceV0
|
|
84
|
+
},
|
|
85
|
+
bullmq: {
|
|
86
|
+
opName: () => 'bullmq.processJob',
|
|
87
|
+
serviceName: ({ tracerService }) => `${tracerService}-bullmq`
|
|
80
88
|
}
|
|
81
89
|
},
|
|
82
90
|
client: {
|
|
@@ -24,6 +24,10 @@ const web = {
|
|
|
24
24
|
opName: () => 'http.request',
|
|
25
25
|
serviceName: httpPluginClientService
|
|
26
26
|
},
|
|
27
|
+
genai: {
|
|
28
|
+
opName: () => 'google_genai.request',
|
|
29
|
+
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService
|
|
30
|
+
},
|
|
27
31
|
aws: {
|
|
28
32
|
opName: () => 'aws.request',
|
|
29
33
|
serviceName: awsServiceV0
|
|
@@ -44,6 +44,10 @@ const messaging = {
|
|
|
44
44
|
sns: {
|
|
45
45
|
opName: () => 'aws.sns.send',
|
|
46
46
|
serviceName: identityService
|
|
47
|
+
},
|
|
48
|
+
bullmq: {
|
|
49
|
+
opName: () => 'bullmq.add',
|
|
50
|
+
serviceName: identityService
|
|
47
51
|
}
|
|
48
52
|
},
|
|
49
53
|
consumer: {
|
|
@@ -65,6 +69,10 @@ const messaging = {
|
|
|
65
69
|
sqs: {
|
|
66
70
|
opName: () => 'aws.sqs.process',
|
|
67
71
|
serviceName: identityService
|
|
72
|
+
},
|
|
73
|
+
bullmq: {
|
|
74
|
+
opName: () => 'bullmq.processJob',
|
|
75
|
+
serviceName: identityService
|
|
68
76
|
}
|
|
69
77
|
},
|
|
70
78
|
client: {
|
|
@@ -16,6 +16,10 @@ const web = {
|
|
|
16
16
|
opName: () => 'http.client.request',
|
|
17
17
|
serviceName: httpPluginClientService
|
|
18
18
|
},
|
|
19
|
+
genai: {
|
|
20
|
+
opName: () => 'google_genai.request',
|
|
21
|
+
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService
|
|
22
|
+
},
|
|
19
23
|
fetch: {
|
|
20
24
|
opName: () => 'http.client.request',
|
|
21
25
|
serviceName: httpPluginClientService
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const constants = require('./constants')
|
|
4
3
|
const tags = require('../../../ext/tags')
|
|
4
|
+
const constants = require('./constants')
|
|
5
5
|
const id = require('./id')
|
|
6
6
|
const { isError } = require('./util')
|
|
7
7
|
const { registerExtraService } = require('./service-naming/extra-services')
|
|
8
|
+
const { TRACING_FIELD_NAME } = require('./process-tags')
|
|
8
9
|
|
|
9
10
|
const SAMPLING_PRIORITY_KEY = constants.SAMPLING_PRIORITY_KEY
|
|
10
11
|
const SAMPLING_RULE_DECISION = constants.SAMPLING_RULE_DECISION
|
|
@@ -32,13 +33,13 @@ const map = {
|
|
|
32
33
|
'resource.name': 'resource'
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
function format (span,
|
|
36
|
+
function format (span, isFirstSpanInChunk = false, tagForFirstSpanInChunk = false) {
|
|
36
37
|
const formatted = formatSpan(span)
|
|
37
38
|
|
|
38
39
|
extractSpanLinks(formatted, span)
|
|
39
40
|
extractSpanEvents(formatted, span)
|
|
40
41
|
extractRootTags(formatted, span)
|
|
41
|
-
extractChunkTags(formatted, span,
|
|
42
|
+
extractChunkTags(formatted, span, isFirstSpanInChunk, tagForFirstSpanInChunk)
|
|
42
43
|
extractTags(formatted, span)
|
|
43
44
|
|
|
44
45
|
return formatted
|
|
@@ -192,10 +193,14 @@ function extractRootTags (formattedSpan, span) {
|
|
|
192
193
|
addTag({}, formattedSpan.metrics, TOP_LEVEL_KEY, 1)
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
function extractChunkTags (formattedSpan, span,
|
|
196
|
+
function extractChunkTags (formattedSpan, span, isFirstSpanInChunk, tagForFirstSpanInChunk) {
|
|
196
197
|
const context = span.context()
|
|
197
198
|
|
|
198
|
-
if (!
|
|
199
|
+
if (!isFirstSpanInChunk) return
|
|
200
|
+
|
|
201
|
+
if (tagForFirstSpanInChunk) {
|
|
202
|
+
addTag(formattedSpan.meta, formattedSpan.metrics, TRACING_FIELD_NAME, tagForFirstSpanInChunk)
|
|
203
|
+
}
|
|
199
204
|
|
|
200
205
|
for (const [key, value] of Object.entries(context._trace.tags)) {
|
|
201
206
|
addTag(formattedSpan.meta, formattedSpan.metrics, key, value)
|
|
@@ -5,6 +5,7 @@ const spanFormat = require('./span_format')
|
|
|
5
5
|
const SpanSampler = require('./span_sampler')
|
|
6
6
|
const GitMetadataTagger = require('./git_metadata_tagger')
|
|
7
7
|
const { getEnvironmentVariable } = require('./config-helper')
|
|
8
|
+
const processTags = require('./process-tags')
|
|
8
9
|
|
|
9
10
|
const startedSpans = new WeakSet()
|
|
10
11
|
const finishedSpans = new WeakSet()
|
|
@@ -24,6 +25,10 @@ class SpanProcessor {
|
|
|
24
25
|
|
|
25
26
|
this._spanSampler = new SpanSampler(config.sampler)
|
|
26
27
|
this._gitMetadataTagger = new GitMetadataTagger(config)
|
|
28
|
+
|
|
29
|
+
this._processTags = config.propagateProcessTags?.enabled
|
|
30
|
+
? processTags.serialized
|
|
31
|
+
: false
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
sample (span) {
|
|
@@ -49,14 +54,14 @@ class SpanProcessor {
|
|
|
49
54
|
this.sample(span)
|
|
50
55
|
this._gitMetadataTagger.tagGitMetadata(spanContext)
|
|
51
56
|
|
|
52
|
-
let
|
|
57
|
+
let isFirstSpanInChunk = true
|
|
53
58
|
|
|
54
59
|
for (const span of started) {
|
|
55
60
|
if (span._duration === undefined) {
|
|
56
61
|
active.push(span)
|
|
57
62
|
} else {
|
|
58
|
-
const formattedSpan = spanFormat(span,
|
|
59
|
-
|
|
63
|
+
const formattedSpan = spanFormat(span, isFirstSpanInChunk, this._processTags)
|
|
64
|
+
isFirstSpanInChunk = false
|
|
60
65
|
this._stats?.onSpanFinished(formattedSpan)
|
|
61
66
|
formatted.push(formattedSpan)
|
|
62
67
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const os = require('os')
|
|
4
|
-
const { version } = require('./pkg')
|
|
3
|
+
const os = require('node:os')
|
|
5
4
|
const pkg = require('../../../package.json')
|
|
6
5
|
|
|
7
|
-
const { LogCollapsingLowestDenseDDSketch } = require('
|
|
8
|
-
const { ORIGIN_KEY, TOP_LEVEL_KEY } = require('./constants')
|
|
6
|
+
const { LogCollapsingLowestDenseDDSketch } = require('../../../vendor/dist/@datadog/sketches-js')
|
|
9
7
|
const {
|
|
10
8
|
MEASURED,
|
|
11
|
-
HTTP_STATUS_CODE
|
|
9
|
+
HTTP_STATUS_CODE,
|
|
10
|
+
HTTP_ENDPOINT,
|
|
11
|
+
HTTP_ROUTE,
|
|
12
|
+
HTTP_METHOD
|
|
12
13
|
} = require('../../../ext/tags')
|
|
14
|
+
const { ORIGIN_KEY, TOP_LEVEL_KEY } = require('./constants')
|
|
15
|
+
const { version } = require('./pkg')
|
|
16
|
+
const processTags = require('./process-tags')
|
|
13
17
|
|
|
14
18
|
const { SpanStatsExporter } = require('./exporters/span-stats')
|
|
15
19
|
|
|
@@ -53,7 +57,9 @@ class SpanAggStats {
|
|
|
53
57
|
resource,
|
|
54
58
|
type,
|
|
55
59
|
statusCode,
|
|
56
|
-
synthetics
|
|
60
|
+
synthetics,
|
|
61
|
+
method,
|
|
62
|
+
endpoint
|
|
57
63
|
} = this.aggKey
|
|
58
64
|
|
|
59
65
|
return {
|
|
@@ -63,6 +69,8 @@ class SpanAggStats {
|
|
|
63
69
|
Type: type,
|
|
64
70
|
HTTPStatusCode: statusCode,
|
|
65
71
|
Synthetics: synthetics,
|
|
72
|
+
HTTPMethod: method,
|
|
73
|
+
HTTPEndpoint: endpoint,
|
|
66
74
|
Hits: this.hits,
|
|
67
75
|
TopLevelHits: this.topLevelHits,
|
|
68
76
|
Errors: this.errors,
|
|
@@ -81,6 +89,8 @@ class SpanAggKey {
|
|
|
81
89
|
this.type = span.type || ''
|
|
82
90
|
this.statusCode = span.meta[HTTP_STATUS_CODE] || 0
|
|
83
91
|
this.synthetics = span.meta[ORIGIN_KEY] === 'synthetics'
|
|
92
|
+
this.endpoint = span.meta[HTTP_ROUTE] || span.meta[HTTP_ENDPOINT] || ''
|
|
93
|
+
this.method = span.meta[HTTP_METHOD] || ''
|
|
84
94
|
}
|
|
85
95
|
|
|
86
96
|
toString () {
|
|
@@ -90,7 +100,9 @@ class SpanAggKey {
|
|
|
90
100
|
this.resource,
|
|
91
101
|
this.type,
|
|
92
102
|
this.statusCode,
|
|
93
|
-
this.synthetics
|
|
103
|
+
this.synthetics,
|
|
104
|
+
this.method,
|
|
105
|
+
this.endpoint
|
|
94
106
|
].join(',')
|
|
95
107
|
}
|
|
96
108
|
}
|
|
@@ -165,7 +177,8 @@ class SpanStatsProcessor {
|
|
|
165
177
|
Lang: 'javascript',
|
|
166
178
|
TracerVersion: pkg.version,
|
|
167
179
|
RuntimeID: this.tags['runtime-id'],
|
|
168
|
-
Sequence: ++this.sequence
|
|
180
|
+
Sequence: ++this.sequence,
|
|
181
|
+
ProcessTags: processTags.serialized
|
|
169
182
|
})
|
|
170
183
|
}
|
|
171
184
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-console */
|
|
4
4
|
|
|
5
|
-
const SortedSet = require('tlhunter-sorted-set')
|
|
5
|
+
const SortedSet = require('../../../vendor/dist/tlhunter-sorted-set')
|
|
6
6
|
|
|
7
7
|
const INTERVAL = 1000 // look for expired spans every 1s
|
|
8
8
|
const LIFETIME = 60 * 1000 // all spans have a max lifetime of 1m
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const { channel } = require('dc-polyfill')
|
|
4
|
-
const TraceSourcePrioritySampler = require('./tracesource_priority_sampler')
|
|
5
4
|
const { USER_KEEP } = require('../../../../ext/priority')
|
|
6
5
|
const TraceState = require('../opentracing/propagation/tracestate')
|
|
7
6
|
const { APM_TRACING_ENABLED_KEY } = require('../constants')
|
|
7
|
+
const TraceSourcePrioritySampler = require('./tracesource_priority_sampler')
|
|
8
8
|
const { hasTraceSourcePropagationTag } = require('./tracesource')
|
|
9
9
|
|
|
10
10
|
const startCh = channel('dd-trace:span:start')
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const { info, warn } = require('./log/writer')
|
|
4
|
-
|
|
5
3
|
const os = require('os')
|
|
6
4
|
const { inspect } = require('util')
|
|
7
|
-
|
|
5
|
+
|
|
8
6
|
const tracerVersion = require('../../../package.json').version
|
|
7
|
+
const defaults = require('./config_defaults')
|
|
8
|
+
const { info, warn } = require('./log/writer')
|
|
9
9
|
|
|
10
10
|
const errors = {}
|
|
11
11
|
let config
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"DD_APPSEC_STACK_TRACE_ENABLED": ["A"],
|
|
38
38
|
"DD_APPSEC_TRACE_RATE_LIMIT": ["A"],
|
|
39
39
|
"DD_APPSEC_WAF_TIMEOUT": ["A"],
|
|
40
|
+
"DD_AZURE_RESOURCE_GROUP": ["A"],
|
|
40
41
|
"DD_CIVISIBILITY_AGENTLESS_ENABLED": ["A"],
|
|
41
42
|
"DD_CIVISIBILITY_AGENTLESS_URL": ["A"],
|
|
42
43
|
"DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER": ["A"],
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"DD_CIVISIBILITY_GIT_UPLOAD_ENABLED": ["A"],
|
|
51
52
|
"DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED": ["A"],
|
|
52
53
|
"DD_CIVISIBILITY_ITR_ENABLED": ["A"],
|
|
54
|
+
"DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS": ["A"],
|
|
53
55
|
"DD_CIVISIBILITY_MANUAL_API_ENABLED": ["A"],
|
|
54
56
|
"DD_CIVISIBILITY_TEST_COMMAND": ["A"],
|
|
55
57
|
"DD_CIVISIBILITY_TEST_MODULE_ID": ["A"],
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
"DD_DBM_PROPAGATION_MODE": ["A"],
|
|
63
65
|
"DD_DOGSTATSD_HOST": ["A"],
|
|
64
66
|
"DD_DOGSTATSD_PORT": ["A"],
|
|
67
|
+
"DD_DYNAMIC_INSTRUMENTATION_CAPTURE_TIMEOUT_MS": ["A"],
|
|
65
68
|
"DD_DYNAMIC_INSTRUMENTATION_ENABLED": ["A"],
|
|
66
69
|
"DD_DYNAMIC_INSTRUMENTATION_PROBE_FILE": ["A"],
|
|
67
70
|
"DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS": ["A"],
|
|
@@ -70,6 +73,7 @@
|
|
|
70
73
|
"DD_ENV": ["A"],
|
|
71
74
|
"DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED": ["A"],
|
|
72
75
|
"DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED": ["A"],
|
|
76
|
+
"DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED": ["A"],
|
|
73
77
|
"DD_EXPERIMENTAL_TEST_OPT_GIT_CACHE_ENABLED": ["A"],
|
|
74
78
|
"DD_EXPERIMENTAL_TEST_OPT_GIT_CACHE_DIR": ["A"],
|
|
75
79
|
"DD_EXTERNAL_ENV": ["A"],
|
|
@@ -124,6 +128,7 @@
|
|
|
124
128
|
"DD_LOG_LEVEL": ["A"],
|
|
125
129
|
"DD_LOGS_INJECTION": ["A"],
|
|
126
130
|
"DD_LOGS_OTEL_ENABLED": ["A"],
|
|
131
|
+
"DD_METRICS_OTEL_ENABLED": ["A"],
|
|
127
132
|
"DD_MINI_AGENT_PATH": ["A"],
|
|
128
133
|
"DD_OPENAI_LOGS_ENABLED": ["A"],
|
|
129
134
|
"DD_OPENAI_SPAN_CHAR_LIMIT": ["A"],
|
|
@@ -158,6 +163,7 @@
|
|
|
158
163
|
"DD_RUNTIME_METRICS_GC_ENABLED": ["A"],
|
|
159
164
|
"DD_RUNTIME_METRICS_FLUSH_INTERVAL": ["A"],
|
|
160
165
|
"DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED": ["A"],
|
|
166
|
+
"DD_TRACE_GCP_PUBSUB_PUSH_ENABLED": ["A"],
|
|
161
167
|
"DD_SERVICE_MAPPING": ["A"],
|
|
162
168
|
"DD_SERVICE": ["A"],
|
|
163
169
|
"DD_SITE": ["A"],
|
|
@@ -239,6 +245,7 @@
|
|
|
239
245
|
"DD_TRACE_BAGGAGE_TAG_KEYS": ["A"],
|
|
240
246
|
"DD_TRACE_BEAUTIFUL_LOGS": ["A"],
|
|
241
247
|
"DD_TRACE_BLUEBIRD_ENABLED": ["A"],
|
|
248
|
+
"DD_TRACE_BULLMQ_ENABLED": ["A"],
|
|
242
249
|
"DD_TRACE_BODY_PARSER_ENABLED": ["A"],
|
|
243
250
|
"DD_TRACE_BSON_ENABLED": ["A"],
|
|
244
251
|
"DD_TRACE_BUNYAN_ENABLED": ["A"],
|
|
@@ -290,6 +297,7 @@
|
|
|
290
297
|
"DD_TRACE_GOOGLE_CLOUD_PUBSUB_ENABLED": ["A"],
|
|
291
298
|
"DD_TRACE_GOOGLE_CLOUD_VERTEXAI_ENABLED": ["A"],
|
|
292
299
|
"DD_TRACE_GOOGLE_GAX_ENABLED": ["A"],
|
|
300
|
+
"DD_TRACE_GOOGLE_GENAI_ENABLED": ["A"],
|
|
293
301
|
"DD_TRACE_GRAPHQL_ENABLED": ["A"],
|
|
294
302
|
"DD_TRACE_GRAPHQL_ERROR_EXTENSIONS": ["A"],
|
|
295
303
|
"DD_TRACE_GRAPHQL_TAG_ENABLED": ["A"],
|
|
@@ -408,6 +416,7 @@
|
|
|
408
416
|
"DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED": ["A"],
|
|
409
417
|
"DD_TRACE_REPORT_HOSTNAME": ["A"],
|
|
410
418
|
"DD_TRACE_REQUEST_ENABLED": ["A"],
|
|
419
|
+
"DD_TRACE_RESOURCE_RENAMING_ENABLED": ["A"],
|
|
411
420
|
"DD_TRACE_RESTIFY_ENABLED": ["A"],
|
|
412
421
|
"DD_TRACE_RHEA_ENABLED": ["A"],
|
|
413
422
|
"DD_TRACE_ROUTER_ENABLED": ["A"],
|
|
@@ -458,6 +467,13 @@
|
|
|
458
467
|
"OTEL_BSP_SCHEDULE_DELAY": ["A"],
|
|
459
468
|
"OTEL_BSP_MAX_EXPORT_BATCH_SIZE": ["A"],
|
|
460
469
|
"OTEL_BSP_MAX_QUEUE_SIZE": ["A"],
|
|
470
|
+
"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": ["A"],
|
|
471
|
+
"OTEL_EXPORTER_OTLP_METRICS_HEADERS": ["A"],
|
|
472
|
+
"OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": ["A"],
|
|
473
|
+
"OTEL_EXPORTER_OTLP_METRICS_TIMEOUT": ["A"],
|
|
474
|
+
"OTEL_METRIC_EXPORT_INTERVAL": ["A"],
|
|
475
|
+
"OTEL_METRIC_EXPORT_TIMEOUT": ["A"],
|
|
476
|
+
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": ["A"],
|
|
461
477
|
"OTEL_METRICS_EXPORTER": ["A"],
|
|
462
478
|
"OTEL_PROPAGATORS": ["A"],
|
|
463
479
|
"OTEL_RESOURCE_ATTRIBUTES": ["A"],
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const path = require('path')
|
|
4
|
-
const parse = require('module-details-from-path')
|
|
5
|
-
const requirePackageJson = require('../require-package-json')
|
|
6
|
-
const { sendData } = require('./send-data')
|
|
7
|
-
const dc = require('dc-polyfill')
|
|
8
4
|
const { fileURLToPath } = require('url')
|
|
5
|
+
const dc = require('dc-polyfill')
|
|
6
|
+
const parse = require('../../../../vendor/dist/module-details-from-path')
|
|
7
|
+
const requirePackageJson = require('../require-package-json')
|
|
9
8
|
const { isTrue } = require('../../src/util')
|
|
9
|
+
const { sendData } = require('./send-data')
|
|
10
10
|
|
|
11
11
|
/** @type {Set<string>} */
|
|
12
12
|
const savedDependenciesToSend = new Set()
|
|
@@ -15,7 +15,7 @@ let updateRetryData
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Keep track of endpoints that still need to be sent.
|
|
18
|
-
* Map key is `${METHOD} ${PATH}`, value is { method, path }
|
|
18
|
+
* Map key is `${METHOD} ${PATH}`, value is { method, path, operationName }
|
|
19
19
|
*/
|
|
20
20
|
const pendingEndpoints = new Map()
|
|
21
21
|
const wildcardEndpoints = new Set()
|
|
@@ -32,11 +32,11 @@ function scheduleFlush () {
|
|
|
32
32
|
setImmediate(flushAndSend).unref()
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function recordEndpoint (method, path) {
|
|
35
|
+
function recordEndpoint (method, path, operationName) {
|
|
36
36
|
const key = endpointKey(method, path)
|
|
37
37
|
if (pendingEndpoints.has(key)) return
|
|
38
38
|
|
|
39
|
-
pendingEndpoints.set(key, { method: method.toUpperCase(), path })
|
|
39
|
+
pendingEndpoints.set(key, { method: method.toUpperCase(), path, operationName })
|
|
40
40
|
scheduleFlush()
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ function onFastifyRoute (routeData) {
|
|
|
46
46
|
|
|
47
47
|
const methods = Array.isArray(routeOptions.method) ? routeOptions.method : [routeOptions.method]
|
|
48
48
|
for (const method of methods) {
|
|
49
|
-
recordEndpoint(method, routeOptions.path)
|
|
49
|
+
recordEndpoint(method, routeOptions.path, 'fastify.request')
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ function onExpressRoute ({ method, path }) {
|
|
|
56
56
|
// If wildcard already recorded for this path, skip specific methods
|
|
57
57
|
if (wildcardEndpoints.has(path)) return
|
|
58
58
|
|
|
59
|
-
recordEndpoint(method, path)
|
|
59
|
+
recordEndpoint(method, path, 'express.request')
|
|
60
60
|
|
|
61
61
|
// If this is a wildcard event, record it and mark path as wildcarded
|
|
62
62
|
if (method === '*') {
|
|
@@ -66,17 +66,17 @@ function onExpressRoute ({ method, path }) {
|
|
|
66
66
|
|
|
67
67
|
// Express automatically adds HEAD support for GET routes
|
|
68
68
|
if (method.toUpperCase() === 'GET') {
|
|
69
|
-
recordEndpoint('HEAD', path)
|
|
69
|
+
recordEndpoint('HEAD', path, 'express.request')
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function buildEndpointObjects (endpoints) {
|
|
74
|
-
return endpoints.map(({ method, path }) => {
|
|
74
|
+
return endpoints.map(({ method, path, operationName }) => {
|
|
75
75
|
return {
|
|
76
76
|
type: 'REST',
|
|
77
77
|
method,
|
|
78
78
|
path,
|
|
79
|
-
operation_name:
|
|
79
|
+
operation_name: operationName,
|
|
80
80
|
resource_name: endpointKey(method, path)
|
|
81
81
|
}
|
|
82
82
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const dc = require('dc-polyfill')
|
|
4
|
-
const logCollector = require('./log-collector')
|
|
5
4
|
const { sendData } = require('../send-data')
|
|
5
|
+
const logCollector = require('./log-collector')
|
|
6
6
|
|
|
7
7
|
const telemetryLog = dc.channel('datadog:telemetry:log')
|
|
8
8
|
const errorLog = dc.channel('datadog:log:error')
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
|
|
3
|
-
const dc = require('dc-polyfill')
|
|
2
|
+
|
|
4
3
|
const os = require('os')
|
|
4
|
+
const dc = require('dc-polyfill')
|
|
5
|
+
|
|
6
|
+
const tracerVersion = require('../../../../package.json').version
|
|
7
|
+
const { errors } = require('../startup-log')
|
|
8
|
+
const logger = require('../log')
|
|
9
|
+
const processTags = require('../process-tags')
|
|
5
10
|
const dependencies = require('./dependencies')
|
|
6
11
|
const endpoints = require('./endpoints')
|
|
7
12
|
const { sendData } = require('./send-data')
|
|
8
|
-
const { errors } = require('../startup-log')
|
|
9
13
|
const { manager: metricsManager } = require('./metrics')
|
|
10
14
|
const telemetryLogger = require('./logs')
|
|
11
|
-
const logger = require('../log')
|
|
12
15
|
|
|
13
16
|
const telemetryStartChannel = dc.channel('datadog:telemetry:start')
|
|
14
17
|
const telemetryStopChannel = dc.channel('datadog:telemetry:stop')
|
|
@@ -78,7 +81,8 @@ function getIntegrations () {
|
|
|
78
81
|
newIntegrations.push({
|
|
79
82
|
name: pluginName,
|
|
80
83
|
enabled: pluginManager._pluginsByName[pluginName]._enabled,
|
|
81
|
-
auto_enabled: true
|
|
84
|
+
auto_enabled: true,
|
|
85
|
+
[processTags.TELEMETRY_FIELD_NAME]: processTags.tagsObject
|
|
82
86
|
})
|
|
83
87
|
sentIntegrations.add(pluginName)
|
|
84
88
|
}
|
|
@@ -155,7 +159,8 @@ function createAppObject (config) {
|
|
|
155
159
|
service_version: config.version,
|
|
156
160
|
tracer_version: tracerVersion,
|
|
157
161
|
language_name: 'nodejs',
|
|
158
|
-
language_version: process.versions.node
|
|
162
|
+
language_version: process.versions.node,
|
|
163
|
+
process_tags: processTags.tagsObject
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
|
|
@@ -339,8 +344,17 @@ const nameMapping = {
|
|
|
339
344
|
otelLogsProtocol: 'OTEL_EXPORTER_OTLP_LOGS_PROTOCOL',
|
|
340
345
|
otelLogsTimeout: 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT',
|
|
341
346
|
otelLogsUrl: 'OTEL_EXPORTER_OTLP_LOGS_ENDPOINT',
|
|
342
|
-
|
|
343
|
-
|
|
347
|
+
otelBatchTimeout: 'OTEL_BSP_SCHEDULE_DELAY',
|
|
348
|
+
otelMaxExportBatchSize: 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',
|
|
349
|
+
otelMaxQueueSize: 'OTEL_BSP_MAX_QUEUE_SIZE',
|
|
350
|
+
otelMetricsEnabled: 'DD_METRICS_OTEL_ENABLED',
|
|
351
|
+
otelMetricsHeaders: 'OTEL_EXPORTER_OTLP_METRICS_HEADERS',
|
|
352
|
+
otelMetricsProtocol: 'OTEL_EXPORTER_OTLP_METRICS_PROTOCOL',
|
|
353
|
+
otelMetricsTimeout: 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT',
|
|
354
|
+
otelMetricsExportTimeout: 'OTEL_METRIC_EXPORT_TIMEOUT',
|
|
355
|
+
otelMetricsUrl: 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT',
|
|
356
|
+
otelMetricsExportInterval: 'OTEL_METRIC_EXPORT_INTERVAL',
|
|
357
|
+
otelMetricsTemporalityPreference: 'OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE',
|
|
344
358
|
}
|
|
345
359
|
|
|
346
360
|
const namesNeedFormatting = new Set(['DD_TAGS', 'peerServiceMapping', 'serviceMapping'])
|