dd-trace 6.0.0-pre-10da8f2 → 6.0.0-pre-b4cfa7f
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 +6 -12
- package/README.md +10 -15
- package/ci/cypress/plugin.js +8 -0
- package/ci/cypress/polyfills.js +23 -0
- package/ci/init.js +15 -6
- package/ext/exporters.d.ts +2 -1
- package/ext/exporters.js +2 -1
- package/index.d.ts +194 -39
- package/init.js +4 -1
- package/initialize.mjs +5 -6
- package/package.json +55 -59
- package/packages/datadog-code-origin/index.js +22 -4
- package/packages/datadog-core/src/storage.js +4 -3
- package/packages/datadog-core/src/utils/src/kebabcase.js +4 -6
- package/packages/datadog-core/src/utils/src/parse-tags.js +1 -1
- package/packages/datadog-core/src/utils/src/pick.js +2 -2
- package/packages/datadog-core/src/utils/src/set.js +9 -11
- package/packages/datadog-core/src/utils/src/uniq.js +1 -1
- package/packages/datadog-esbuild/index.js +7 -4
- package/packages/datadog-instrumentations/src/amqp10.js +19 -17
- package/packages/datadog-instrumentations/src/amqplib.js +57 -37
- package/packages/datadog-instrumentations/src/apollo.js +2 -2
- package/packages/datadog-instrumentations/src/aws-sdk.js +1 -1
- package/packages/datadog-instrumentations/src/cassandra-driver.js +10 -10
- package/packages/datadog-instrumentations/src/child_process.js +3 -3
- package/packages/datadog-instrumentations/src/confluentinc-kafka-javascript.js +420 -0
- package/packages/datadog-instrumentations/src/cookie-parser.js +1 -1
- package/packages/datadog-instrumentations/src/couchbase.js +8 -10
- package/packages/datadog-instrumentations/src/cucumber.js +221 -136
- package/packages/datadog-instrumentations/src/cypress.js +2 -1
- package/packages/datadog-instrumentations/src/dd-trace-api.js +7 -0
- package/packages/datadog-instrumentations/src/dns.js +20 -18
- package/packages/datadog-instrumentations/src/elasticsearch.js +9 -10
- package/packages/datadog-instrumentations/src/express.js +2 -6
- package/packages/datadog-instrumentations/src/fastify.js +37 -11
- package/packages/datadog-instrumentations/src/fetch.js +1 -1
- package/packages/datadog-instrumentations/src/fs.js +44 -52
- package/packages/datadog-instrumentations/src/google-cloud-pubsub.js +35 -43
- package/packages/datadog-instrumentations/src/google-cloud-vertexai.js +102 -0
- package/packages/datadog-instrumentations/src/graphql.js +7 -10
- package/packages/datadog-instrumentations/src/grpc/client.js +11 -23
- package/packages/datadog-instrumentations/src/grpc/server.js +7 -20
- package/packages/datadog-instrumentations/src/hapi.js +10 -11
- package/packages/datadog-instrumentations/src/{check_require_cache.js → helpers/check-require-cache.js} +2 -2
- package/packages/datadog-instrumentations/src/helpers/extract-package-and-module-path.js +42 -0
- package/packages/datadog-instrumentations/src/helpers/fetch.js +4 -5
- package/packages/datadog-instrumentations/src/helpers/hook.js +2 -3
- package/packages/datadog-instrumentations/src/helpers/hooks.js +6 -3
- package/packages/datadog-instrumentations/src/helpers/instrument.js +1 -41
- package/packages/datadog-instrumentations/src/helpers/register.js +78 -22
- package/packages/datadog-instrumentations/src/http/client.js +16 -21
- package/packages/datadog-instrumentations/src/iovalkey.js +51 -0
- package/packages/datadog-instrumentations/src/jest.js +745 -467
- package/packages/datadog-instrumentations/src/kafkajs.js +65 -44
- package/packages/datadog-instrumentations/src/knex.js +4 -4
- package/packages/datadog-instrumentations/src/koa.js +2 -3
- package/packages/datadog-instrumentations/src/langchain.js +57 -42
- package/packages/datadog-instrumentations/src/ldapjs.js +3 -4
- package/packages/datadog-instrumentations/src/mariadb.js +65 -62
- package/packages/datadog-instrumentations/src/mocha/main.js +205 -138
- package/packages/datadog-instrumentations/src/mocha/utils.js +219 -116
- package/packages/datadog-instrumentations/src/mocha/worker.js +16 -9
- package/packages/datadog-instrumentations/src/mocha.js +3 -1
- package/packages/datadog-instrumentations/src/mongodb-core.js +1 -1
- package/packages/datadog-instrumentations/src/mysql.js +30 -37
- package/packages/datadog-instrumentations/src/mysql2.js +55 -47
- package/packages/datadog-instrumentations/src/net.js +28 -30
- package/packages/datadog-instrumentations/src/next.js +7 -14
- package/packages/datadog-instrumentations/src/nyc.js +4 -2
- package/packages/datadog-instrumentations/src/openai.js +23 -25
- package/packages/datadog-instrumentations/src/oracledb.js +1 -1
- package/packages/datadog-instrumentations/src/orchestrion-config/index.js +54 -0
- package/packages/datadog-instrumentations/src/otel-sdk-trace.js +4 -3
- package/packages/datadog-instrumentations/src/pg.js +18 -12
- package/packages/datadog-instrumentations/src/playwright.js +570 -142
- package/packages/datadog-instrumentations/src/protobufjs.js +3 -4
- package/packages/datadog-instrumentations/src/redis.js +4 -4
- package/packages/datadog-instrumentations/src/restify.js +9 -13
- package/packages/datadog-instrumentations/src/rhea.js +42 -54
- package/packages/datadog-instrumentations/src/router.js +32 -39
- package/packages/datadog-instrumentations/src/tedious.js +12 -10
- package/packages/datadog-instrumentations/src/url.js +9 -17
- package/packages/datadog-instrumentations/src/vitest.js +289 -140
- package/packages/datadog-plugin-amqp10/src/consumer.js +7 -3
- package/packages/datadog-plugin-amqp10/src/producer.js +7 -3
- package/packages/datadog-plugin-amqplib/src/client.js +6 -2
- package/packages/datadog-plugin-amqplib/src/consumer.js +7 -3
- package/packages/datadog-plugin-amqplib/src/producer.js +7 -3
- package/packages/datadog-plugin-amqplib/src/util.js +1 -1
- package/packages/datadog-plugin-apollo/src/gateway/request.js +5 -6
- package/packages/datadog-plugin-apollo/src/gateway/validate.js +2 -3
- package/packages/datadog-plugin-avsc/src/schema_iterator.js +12 -12
- package/packages/datadog-plugin-aws-sdk/src/base.js +15 -10
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/tracing.js +2 -2
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/utils.js +13 -13
- package/packages/datadog-plugin-aws-sdk/src/services/cloudwatchlogs.js +3 -5
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +28 -44
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +2 -2
- package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +10 -11
- package/packages/datadog-plugin-aws-sdk/src/services/lambda.js +4 -6
- package/packages/datadog-plugin-aws-sdk/src/services/redshift.js +3 -5
- package/packages/datadog-plugin-aws-sdk/src/services/s3.js +3 -5
- package/packages/datadog-plugin-aws-sdk/src/services/sns.js +2 -3
- package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +11 -15
- package/packages/datadog-plugin-aws-sdk/src/services/stepfunctions.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/util.js +5 -6
- package/packages/datadog-plugin-azure-functions/src/index.js +5 -4
- package/packages/datadog-plugin-cassandra-driver/src/index.js +1 -1
- package/packages/datadog-plugin-child_process/src/index.js +4 -4
- package/packages/datadog-plugin-child_process/src/scrub-cmd-params.js +23 -23
- package/packages/datadog-plugin-confluentinc-kafka-javascript/src/batch-consumer.js +11 -0
- package/packages/datadog-plugin-confluentinc-kafka-javascript/src/consumer.js +11 -0
- package/packages/datadog-plugin-confluentinc-kafka-javascript/src/index.js +19 -0
- package/packages/datadog-plugin-confluentinc-kafka-javascript/src/producer.js +11 -0
- package/packages/datadog-plugin-cucumber/src/index.js +134 -25
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +200 -59
- package/packages/datadog-plugin-cypress/src/plugin.js +21 -1
- package/packages/datadog-plugin-cypress/src/support.js +60 -12
- package/packages/datadog-plugin-dd-trace-api/src/index.js +2 -1
- package/packages/datadog-plugin-dns/src/lookup.js +10 -5
- package/packages/datadog-plugin-dns/src/lookup_service.js +6 -2
- package/packages/datadog-plugin-dns/src/resolve.js +5 -2
- package/packages/datadog-plugin-dns/src/reverse.js +6 -2
- package/packages/datadog-plugin-elasticsearch/src/index.js +1 -1
- package/packages/datadog-plugin-express/src/code_origin.js +30 -0
- package/packages/datadog-plugin-express/src/index.js +10 -12
- package/packages/datadog-plugin-express/src/tracing.js +19 -0
- package/packages/datadog-plugin-fs/src/index.js +9 -2
- package/packages/datadog-plugin-google-cloud-pubsub/src/client.js +7 -3
- package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +12 -7
- package/packages/datadog-plugin-google-cloud-pubsub/src/producer.js +6 -2
- package/packages/datadog-plugin-google-cloud-vertexai/src/index.js +17 -0
- package/packages/datadog-plugin-google-cloud-vertexai/src/tracing.js +203 -0
- package/packages/datadog-plugin-google-cloud-vertexai/src/utils.js +19 -0
- package/packages/datadog-plugin-graphql/src/execute.js +2 -2
- package/packages/datadog-plugin-graphql/src/index.js +10 -8
- package/packages/datadog-plugin-graphql/src/parse.js +1 -3
- package/packages/datadog-plugin-graphql/src/resolve.js +19 -12
- package/packages/datadog-plugin-graphql/src/tools/index.js +1 -0
- package/packages/datadog-plugin-graphql/src/tools/signature.js +1 -0
- package/packages/datadog-plugin-graphql/src/tools/transforms.js +1 -0
- package/packages/datadog-plugin-grpc/src/client.js +2 -2
- package/packages/datadog-plugin-grpc/src/util.js +2 -2
- package/packages/datadog-plugin-http/src/client.js +23 -13
- package/packages/datadog-plugin-http2/src/client.js +24 -25
- package/packages/datadog-plugin-iovalkey/src/index.js +18 -0
- package/packages/datadog-plugin-jest/src/index.js +99 -35
- package/packages/datadog-plugin-jest/src/util.js +8 -8
- package/packages/datadog-plugin-kafkajs/src/batch-consumer.js +5 -2
- package/packages/datadog-plugin-kafkajs/src/consumer.js +21 -26
- package/packages/datadog-plugin-kafkajs/src/producer.js +19 -7
- package/packages/datadog-plugin-kafkajs/src/utils.js +27 -0
- package/packages/datadog-plugin-langchain/src/handlers/chain.js +7 -7
- package/packages/datadog-plugin-langchain/src/handlers/embedding.js +6 -3
- package/packages/datadog-plugin-langchain/src/handlers/language_models/chat_model.js +6 -4
- package/packages/datadog-plugin-langchain/src/handlers/language_models/llm.js +5 -4
- package/packages/datadog-plugin-langchain/src/index.js +17 -12
- package/packages/datadog-plugin-langchain/src/tracing.js +77 -16
- package/packages/datadog-plugin-mariadb/src/index.js +3 -9
- package/packages/datadog-plugin-mocha/src/index.js +147 -55
- package/packages/datadog-plugin-mongodb-core/src/index.js +30 -2
- package/packages/datadog-plugin-mysql/src/index.js +22 -9
- package/packages/datadog-plugin-mysql2/src/index.js +16 -0
- package/packages/datadog-plugin-net/src/ipc.js +6 -4
- package/packages/datadog-plugin-net/src/tcp.js +16 -10
- package/packages/datadog-plugin-next/src/index.js +7 -6
- package/packages/datadog-plugin-openai/src/services.js +6 -10
- package/packages/datadog-plugin-openai/src/tracing.js +133 -96
- package/packages/datadog-plugin-oracledb/src/index.js +3 -2
- package/packages/datadog-plugin-pg/src/index.js +5 -1
- package/packages/datadog-plugin-playwright/src/index.js +205 -27
- package/packages/datadog-plugin-protobufjs/src/schema_iterator.js +8 -9
- package/packages/datadog-plugin-redis/src/index.js +10 -7
- package/packages/datadog-plugin-rhea/src/consumer.js +8 -6
- package/packages/datadog-plugin-rhea/src/producer.js +5 -2
- package/packages/datadog-plugin-router/src/index.js +1 -1
- package/packages/datadog-plugin-selenium/src/index.js +1 -6
- package/packages/datadog-plugin-tedious/src/index.js +14 -9
- package/packages/datadog-plugin-vitest/src/index.js +184 -83
- package/packages/datadog-shimmer/src/shimmer.js +204 -233
- package/packages/dd-trace/src/appsec/api_security_sampler.js +28 -16
- package/packages/dd-trace/src/appsec/blocked_templates.js +1 -1
- package/packages/dd-trace/src/appsec/blocking.js +31 -36
- package/packages/dd-trace/src/appsec/channels.js +23 -21
- package/packages/dd-trace/src/appsec/graphql.js +17 -8
- package/packages/dd-trace/src/appsec/iast/analyzers/analyzers.js +0 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/cookie-analyzer.js +1 -17
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-password-rules.js +0 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-secret-rules.js +0 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-secrets-rules.js +0 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hsts-header-missing-analyzer.js +7 -12
- package/packages/dd-trace/src/appsec/iast/analyzers/missing-header-analyzer.js +5 -8
- package/packages/dd-trace/src/appsec/iast/analyzers/nosql-injection-mongodb-analyzer.js +43 -15
- package/packages/dd-trace/src/appsec/iast/analyzers/path-traversal-analyzer.js +9 -12
- package/packages/dd-trace/src/appsec/iast/analyzers/sql-injection-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/unvalidated-redirect-analyzer.js +13 -20
- package/packages/dd-trace/src/appsec/iast/analyzers/vulnerability-analyzer.js +5 -4
- package/packages/dd-trace/src/appsec/iast/context/context-plugin.js +2 -3
- package/packages/dd-trace/src/appsec/iast/iast-plugin.js +4 -4
- package/packages/dd-trace/src/appsec/iast/index.js +1 -1
- package/packages/dd-trace/src/appsec/iast/overhead-controller.js +102 -7
- package/packages/dd-trace/src/appsec/iast/path-line.js +7 -8
- package/packages/dd-trace/src/appsec/iast/security-controls/index.js +17 -25
- package/packages/dd-trace/src/appsec/iast/security-controls/parser.js +6 -6
- package/packages/dd-trace/src/appsec/iast/taint-tracking/filter.js +4 -4
- package/packages/dd-trace/src/appsec/iast/taint-tracking/index.js +0 -3
- package/packages/dd-trace/src/appsec/iast/taint-tracking/operations-taint-object.js +47 -4
- package/packages/dd-trace/src/appsec/iast/taint-tracking/operations.js +6 -29
- package/packages/dd-trace/src/appsec/iast/taint-tracking/plugin.js +9 -10
- package/packages/dd-trace/src/appsec/iast/taint-tracking/plugins/kafka.js +3 -4
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs +26 -13
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-telemetry.js +3 -32
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +111 -65
- package/packages/dd-trace/src/appsec/iast/taint-tracking/source-types.js +0 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +2 -2
- package/packages/dd-trace/src/appsec/iast/telemetry/span-tags.js +7 -7
- package/packages/dd-trace/src/appsec/iast/telemetry/verbosity.js +2 -3
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/range-utils.js +10 -11
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/command-sensitive-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/ldap-sensitive-analyzer.js +2 -2
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/sql-sensitive-analyzer.js +7 -7
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-handler.js +23 -28
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-regex.js +3 -3
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/index.js +4 -4
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/utils.js +6 -11
- package/packages/dd-trace/src/appsec/iast/vulnerabilities.js +0 -1
- package/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +11 -15
- package/packages/dd-trace/src/appsec/index.js +38 -18
- package/packages/dd-trace/src/appsec/rasp/command_injection.js +1 -1
- package/packages/dd-trace/src/appsec/rasp/index.js +21 -17
- package/packages/dd-trace/src/appsec/rasp/lfi.js +3 -2
- package/packages/dd-trace/src/appsec/rasp/sql_injection.js +1 -1
- package/packages/dd-trace/src/appsec/rasp/ssrf.js +1 -1
- package/packages/dd-trace/src/appsec/rasp/utils.js +18 -9
- package/packages/dd-trace/src/appsec/recommended.json +256 -84
- package/packages/dd-trace/src/appsec/reporter.js +289 -59
- package/packages/dd-trace/src/appsec/rule_manager.js +2 -2
- package/packages/dd-trace/src/appsec/sdk/index.js +23 -1
- package/packages/dd-trace/src/appsec/sdk/noop.js +10 -0
- package/packages/dd-trace/src/appsec/sdk/set_user.js +4 -3
- package/packages/dd-trace/src/appsec/sdk/track_event.js +137 -11
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +3 -6
- package/packages/dd-trace/src/appsec/stack_trace.js +2 -4
- package/packages/dd-trace/src/appsec/telemetry/common.js +6 -2
- package/packages/dd-trace/src/appsec/telemetry/index.js +89 -9
- package/packages/dd-trace/src/appsec/telemetry/rasp.js +75 -7
- package/packages/dd-trace/src/appsec/telemetry/user.js +9 -1
- package/packages/dd-trace/src/appsec/telemetry/waf.js +66 -17
- package/packages/dd-trace/src/appsec/user_tracking.js +5 -9
- package/packages/dd-trace/src/appsec/waf/waf_context_wrapper.js +59 -21
- package/packages/dd-trace/src/appsec/waf/waf_manager.js +16 -7
- package/packages/dd-trace/src/azure_metadata.js +9 -9
- package/packages/dd-trace/src/baggage.js +36 -0
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +9 -8
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +2 -2
- package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +3 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +3 -3
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +3 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +3 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +5 -4
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +22 -16
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +6 -5
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +14 -8
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +6 -6
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +3 -2
- package/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +5 -4
- package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +14 -9
- package/packages/dd-trace/src/ci-visibility/telemetry.js +6 -1
- package/packages/dd-trace/src/ci-visibility/{quarantined-tests/get-quarantined-tests.js → test-management/get-test-management-tests.js} +14 -9
- package/packages/dd-trace/src/config-helper.js +89 -0
- package/packages/dd-trace/src/config.js +377 -193
- package/packages/dd-trace/src/config_stable.js +103 -0
- package/packages/dd-trace/src/constants.js +4 -2
- package/packages/dd-trace/src/datastreams/encoding.js +9 -9
- package/packages/dd-trace/src/datastreams/fnv.js +2 -2
- package/packages/dd-trace/src/datastreams/pathway.js +4 -4
- package/packages/dd-trace/src/datastreams/processor.js +8 -12
- package/packages/dd-trace/src/datastreams/schemas/schema_builder.js +7 -7
- package/packages/dd-trace/src/datastreams/schemas/schema_sampler.js +4 -6
- package/packages/dd-trace/src/datastreams/size.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +193 -22
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +294 -0
- package/packages/dd-trace/src/debugger/devtools_client/defaults.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/index.js +141 -75
- package/packages/dd-trace/src/debugger/devtools_client/remote_config.js +18 -44
- package/packages/dd-trace/src/debugger/devtools_client/send.js +22 -13
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/collector.js +16 -12
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/index.js +15 -7
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/processor.js +80 -76
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/redaction.js +4 -4
- package/packages/dd-trace/src/debugger/devtools_client/source-maps.js +3 -11
- package/packages/dd-trace/src/debugger/devtools_client/state.js +34 -6
- package/packages/dd-trace/src/debugger/devtools_client/status.js +5 -1
- package/packages/dd-trace/src/debugger/index.js +4 -0
- package/packages/dd-trace/src/dogstatsd.js +184 -36
- package/packages/dd-trace/src/encode/0.4.js +122 -16
- package/packages/dd-trace/src/encode/0.5.js +11 -7
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +17 -10
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +1 -1
- package/packages/dd-trace/src/encode/tags-processors.js +1 -1
- package/packages/dd-trace/src/exporter.js +8 -6
- package/packages/dd-trace/src/exporters/agent/index.js +4 -3
- package/packages/dd-trace/src/exporters/agent/writer.js +6 -7
- package/packages/dd-trace/src/exporters/common/docker.js +28 -15
- package/packages/dd-trace/src/exporters/common/form-data.js +6 -4
- package/packages/dd-trace/src/exporters/common/request.js +6 -6
- package/packages/dd-trace/src/exporters/common/util.js +4 -2
- package/packages/dd-trace/src/external-logger/src/index.js +5 -5
- package/packages/dd-trace/src/flare/file.js +1 -5
- package/packages/dd-trace/src/format.js +80 -81
- package/packages/dd-trace/src/git_properties.js +1 -1
- package/packages/dd-trace/src/guardrails/index.js +2 -0
- package/packages/dd-trace/src/guardrails/telemetry.js +2 -5
- package/packages/dd-trace/src/histogram.js +12 -23
- package/packages/dd-trace/src/id.js +15 -9
- package/packages/dd-trace/src/iitm.js +10 -22
- package/packages/dd-trace/src/index.js +4 -3
- package/packages/dd-trace/src/lambda/handler.js +7 -6
- package/packages/dd-trace/src/lambda/index.js +2 -1
- package/packages/dd-trace/src/lambda/runtime/patch.js +12 -9
- package/packages/dd-trace/src/lambda/runtime/ritm.js +17 -21
- package/packages/dd-trace/src/llmobs/constants/tags.js +3 -0
- package/packages/dd-trace/src/llmobs/constants/writers.js +9 -5
- package/packages/dd-trace/src/llmobs/index.js +49 -13
- package/packages/dd-trace/src/llmobs/noop.js +19 -21
- package/packages/dd-trace/src/llmobs/plugins/base.js +4 -1
- package/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js +11 -7
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/chain.js +2 -6
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/chat_model.js +3 -3
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/index.js +11 -13
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +69 -9
- package/packages/dd-trace/src/llmobs/plugins/openai.js +29 -3
- package/packages/dd-trace/src/llmobs/plugins/vertexai.js +197 -0
- package/packages/dd-trace/src/llmobs/sdk.js +159 -124
- package/packages/dd-trace/src/llmobs/span_processor.js +7 -1
- package/packages/dd-trace/src/llmobs/tagger.js +144 -107
- package/packages/dd-trace/src/llmobs/telemetry.js +168 -0
- package/packages/dd-trace/src/llmobs/util.js +9 -9
- package/packages/dd-trace/src/llmobs/writers/base.js +89 -36
- package/packages/dd-trace/src/llmobs/writers/evaluations.js +9 -6
- package/packages/dd-trace/src/llmobs/writers/spans.js +69 -0
- package/packages/dd-trace/src/llmobs/writers/util.js +60 -0
- package/packages/dd-trace/src/log/index.js +30 -26
- package/packages/dd-trace/src/log/log.js +1 -1
- package/packages/dd-trace/src/log/utils.js +16 -0
- package/packages/dd-trace/src/log/writer.js +22 -6
- package/packages/dd-trace/src/msgpack/chunk.js +3 -3
- package/packages/dd-trace/src/msgpack/encoder.js +31 -31
- package/packages/dd-trace/src/noop/dogstatsd.js +11 -5
- package/packages/dd-trace/src/noop/proxy.js +5 -0
- package/packages/dd-trace/src/noop/span.js +4 -6
- package/packages/dd-trace/src/noop/tracer.js +1 -2
- package/packages/dd-trace/src/opentelemetry/context_manager.js +2 -0
- package/packages/dd-trace/src/opentelemetry/span.js +4 -4
- package/packages/dd-trace/src/opentelemetry/span_processor.js +2 -2
- package/packages/dd-trace/src/opentelemetry/tracer.js +7 -6
- package/packages/dd-trace/src/opentracing/propagation/log.js +10 -13
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +69 -50
- package/packages/dd-trace/src/opentracing/propagation/tracestate.js +8 -4
- package/packages/dd-trace/src/opentracing/span.js +29 -20
- package/packages/dd-trace/src/opentracing/tracer.js +9 -6
- package/packages/dd-trace/src/payload-tagging/config/index.js +17 -21
- package/packages/dd-trace/src/payload-tagging/index.js +1 -1
- package/packages/dd-trace/src/payload-tagging/jsonpath-plus.js +1 -1
- package/packages/dd-trace/src/payload-tagging/tagging.js +6 -6
- package/packages/dd-trace/src/pkg.js +1 -1
- package/packages/dd-trace/src/plugin_manager.js +8 -10
- package/packages/dd-trace/src/plugins/ci_plugin.js +113 -19
- package/packages/dd-trace/src/plugins/consumer.js +2 -2
- package/packages/dd-trace/src/plugins/database.js +4 -4
- package/packages/dd-trace/src/plugins/inbound.js +5 -1
- package/packages/dd-trace/src/plugins/index.js +6 -1
- package/packages/dd-trace/src/plugins/log_plugin.js +9 -15
- package/packages/dd-trace/src/plugins/outbound.js +11 -4
- package/packages/dd-trace/src/plugins/plugin.js +3 -1
- package/packages/dd-trace/src/plugins/producer.js +2 -2
- package/packages/dd-trace/src/plugins/storage.js +2 -2
- package/packages/dd-trace/src/plugins/tracing.js +8 -4
- package/packages/dd-trace/src/plugins/util/ci.js +28 -20
- package/packages/dd-trace/src/plugins/util/git.js +194 -24
- package/packages/dd-trace/src/plugins/util/inferred_proxy.js +1 -1
- package/packages/dd-trace/src/plugins/util/ip_extractor.js +1 -1
- package/packages/dd-trace/src/plugins/util/llm.js +27 -10
- package/packages/dd-trace/src/plugins/util/stacktrace.js +9 -2
- package/packages/dd-trace/src/plugins/util/test.js +423 -30
- package/packages/dd-trace/src/plugins/util/url.js +1 -1
- package/packages/dd-trace/src/plugins/util/urlfilter.js +13 -17
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +14 -4
- package/packages/dd-trace/src/plugins/util/web.js +16 -12
- package/packages/dd-trace/src/priority_sampler.js +156 -42
- package/packages/dd-trace/src/profiler.js +1 -1
- package/packages/dd-trace/src/profiling/config.js +51 -35
- package/packages/dd-trace/src/profiling/exporter_cli.js +21 -21
- package/packages/dd-trace/src/profiling/exporters/agent.js +2 -6
- package/packages/dd-trace/src/profiling/exporters/event_serializer.js +7 -6
- package/packages/dd-trace/src/profiling/exporters/file.js +2 -1
- package/packages/dd-trace/src/profiling/index.js +2 -1
- package/packages/dd-trace/src/profiling/profiler.js +48 -9
- package/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookup.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookupservice.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/event_plugins/dns_resolve.js +2 -2
- package/packages/dd-trace/src/profiling/profilers/event_plugins/dns_reverse.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/event_plugins/event.js +15 -14
- package/packages/dd-trace/src/profiling/profilers/events.js +24 -19
- package/packages/dd-trace/src/profiling/profilers/shared.js +6 -1
- package/packages/dd-trace/src/profiling/profilers/space.js +3 -3
- package/packages/dd-trace/src/profiling/profilers/wall.js +8 -9
- package/packages/dd-trace/src/profiling/ssi-heuristics.js +3 -5
- package/packages/dd-trace/src/profiling/ssi-telemetry-mock-profiler.js +3 -1
- package/packages/dd-trace/src/profiling/tagger.js +21 -13
- package/packages/dd-trace/src/profiling/webspan-utils.js +1 -1
- package/packages/dd-trace/src/proxy.js +64 -26
- package/packages/dd-trace/src/random_sampler.js +40 -0
- package/packages/dd-trace/src/rate_limiter.js +4 -4
- package/packages/dd-trace/src/remote_config/index.js +4 -7
- package/packages/dd-trace/src/remote_config/manager.js +30 -13
- package/packages/dd-trace/src/require-package-json.js +1 -1
- package/packages/dd-trace/src/ritm.js +8 -8
- package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +27 -91
- package/packages/dd-trace/src/sampler.js +48 -2
- package/packages/dd-trace/src/sampling_rule.js +12 -3
- package/packages/dd-trace/src/scope.js +1 -1
- package/packages/dd-trace/src/serverless.js +10 -51
- package/packages/dd-trace/src/service-naming/schemas/util.js +1 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/storage.js +8 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/web.js +2 -3
- package/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/storage.js +4 -0
- package/packages/dd-trace/src/span_processor.js +12 -8
- package/packages/dd-trace/src/span_sampler.js +4 -1
- package/packages/dd-trace/src/span_stats.js +3 -4
- package/packages/dd-trace/src/standalone/index.js +70 -0
- package/packages/dd-trace/src/standalone/product.js +26 -0
- package/packages/dd-trace/src/standalone/tracesource.js +21 -0
- package/packages/dd-trace/src/standalone/tracesource_priority_sampler.js +46 -0
- package/packages/dd-trace/src/startup-log.js +8 -19
- package/packages/dd-trace/src/supported-configurations.json +442 -0
- package/packages/dd-trace/src/tagger.js +38 -33
- package/packages/dd-trace/src/telemetry/dependencies.js +64 -59
- package/packages/dd-trace/src/telemetry/logs/log-collector.js +9 -10
- package/packages/dd-trace/src/telemetry/metrics.js +10 -13
- package/packages/dd-trace/src/telemetry/send-data.js +13 -8
- package/packages/dd-trace/src/telemetry/telemetry.js +38 -46
- package/packages/dd-trace/src/tracer.js +7 -10
- package/packages/dd-trace/src/util.js +9 -11
- package/version.js +1 -0
- package/packages/datadog-core/src/utils/src/get.js +0 -11
- package/packages/datadog-core/src/utils/src/has.js +0 -14
- package/packages/datadog-instrumentations/src/paperplane.js +0 -77
- package/packages/datadog-instrumentations/src/utils/src/extract-package-and-module-path.js +0 -36
- package/packages/datadog-plugin-paperplane/src/index.js +0 -25
- package/packages/datadog-plugin-paperplane/src/logger.js +0 -11
- package/packages/datadog-plugin-paperplane/src/server.js +0 -24
- package/packages/dd-trace/src/appsec/iast/analyzers/header-injection-analyzer.js +0 -122
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/header-sensitive-analyzer.js +0 -20
- package/packages/dd-trace/src/appsec/standalone.js +0 -130
- package/packages/dd-trace/src/llmobs/writers/spans/agentProxy.js +0 -23
- package/packages/dd-trace/src/llmobs/writers/spans/agentless.js +0 -17
- package/packages/dd-trace/src/llmobs/writers/spans/base.js +0 -52
package/LICENSE-3rdparty.csv
CHANGED
|
@@ -2,10 +2,10 @@ Component,Origin,License,Copyright
|
|
|
2
2
|
require,@datadog/libdatadog,Apache license 2.0,Copyright 2024 Datadog Inc.
|
|
3
3
|
require,@datadog/native-appsec,Apache license 2.0,Copyright 2018 Datadog Inc.
|
|
4
4
|
require,@datadog/native-metrics,Apache license 2.0,Copyright 2018 Datadog Inc.
|
|
5
|
-
require,@datadog/native-iast-rewriter,Apache license 2.0,Copyright 2018 Datadog Inc.
|
|
6
5
|
require,@datadog/native-iast-taint-tracking,Apache license 2.0,Copyright 2018 Datadog Inc.
|
|
7
6
|
require,@datadog/pprof,Apache license 2.0,Copyright 2019 Google Inc.
|
|
8
7
|
require,@datadog/sketches-js,Apache license 2.0,Copyright 2020 Datadog Inc.
|
|
8
|
+
require,@datadog/wasm-js-rewriter,Apache license 2.0,Copyright 2018 Datadog Inc.
|
|
9
9
|
require,@opentelemetry/api,Apache license 2.0,Copyright OpenTelemetry Authors
|
|
10
10
|
require,@opentelemetry/core,Apache license 2.0,Copyright OpenTelemetry Authors
|
|
11
11
|
require,@isaacs/ttlcache,ISC,Copyright (c) 2022-2023 - Isaac Z. Schlueter and Contributors
|
|
@@ -20,6 +20,7 @@ require,limiter,MIT,Copyright 2011 John Hurliman
|
|
|
20
20
|
require,lodash.sortby,MIT,Copyright JS Foundation and other contributors
|
|
21
21
|
require,lru-cache,ISC,Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
|
|
22
22
|
require,module-details-from-path,MIT,Copyright 2016 Thomas Watson Steen
|
|
23
|
+
require,mutexify,MIT,Copyright (c) 2014 Mathias Buus
|
|
23
24
|
require,opentracing,MIT,Copyright 2016 Resonance Labs Inc
|
|
24
25
|
require,path-to-regexp,MIT,Copyright 2014 Blake Embrey
|
|
25
26
|
require,pprof-format,MIT,Copyright 2022 Stephen Belanger
|
|
@@ -31,23 +32,16 @@ require,semifies,Apache license 2.0,Copyright Authors
|
|
|
31
32
|
require,shell-quote,mit,Copyright (c) 2013 James Halliday
|
|
32
33
|
require,source-map,BSD-3-Clause,Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
|
33
34
|
require,ttl-set,MIT,Copyright (c) 2024 Thomas Watson
|
|
34
|
-
dev,@
|
|
35
|
+
dev,@babel/helpers,MIT,Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
35
36
|
dev,@types/node,MIT,Copyright Authors
|
|
36
37
|
dev,@eslint/eslintrc,MIT,Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
37
38
|
dev,@eslint/js,MIT,Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
38
39
|
dev,@msgpack/msgpack,ISC,Copyright 2019 The MessagePack Community
|
|
39
|
-
dev,@stylistic/eslint-plugin
|
|
40
|
-
dev,autocannon,MIT,Copyright 2016 Matteo Collina
|
|
41
|
-
dev,aws-sdk,Apache 2.0,Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
40
|
+
dev,@stylistic/eslint-plugin,MIT,Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
42
41
|
dev,axios,MIT,Copyright 2014-present Matt Zabriskie
|
|
43
42
|
dev,benchmark,MIT,Copyright 2010-2016 Mathias Bynens Robert Kieffer John-David Dalton
|
|
44
43
|
dev,body-parser,MIT,Copyright 2014 Jonathan Ong 2014-2015 Douglas Christopher Wilson
|
|
45
44
|
dev,chai,MIT,Copyright 2017 Chai.js Assertion Library
|
|
46
|
-
dev,chalk,MIT,Copyright Sindre Sorhus
|
|
47
|
-
dev,checksum,MIT,Copyright Daniel D. Shaw
|
|
48
|
-
dev,cli-table3,MIT,Copyright 2014 James Talmage
|
|
49
|
-
dev,dotenv,BSD-2-Clause,Copyright 2015 Scott Motte
|
|
50
|
-
dev,esbuild,MIT,Copyright (c) 2020 Evan Wallace
|
|
51
45
|
dev,eslint,MIT,Copyright JS Foundation and other contributors https://js.foundation
|
|
52
46
|
dev,eslint-config-standard,MIT,Copyright Feross Aboukhadijeh
|
|
53
47
|
dev,eslint-plugin-import,MIT,Copyright 2015 Ben Mosher
|
|
@@ -61,12 +55,11 @@ dev,glob,ISC,Copyright Isaac Z. Schlueter and Contributors
|
|
|
61
55
|
dev,globals,MIT,Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
62
56
|
dev,graphql,MIT,Copyright 2015 Facebook Inc.
|
|
63
57
|
dev,jszip,MIT,Copyright 2015-2016 Stuart Knightley and contributors
|
|
64
|
-
dev,knex,MIT,Copyright (c) 2013-present Tim Griesser
|
|
65
|
-
dev,mkdirp,MIT,Copyright 2010 James Halliday
|
|
66
58
|
dev,mocha,MIT,Copyright 2011-2018 JS Foundation and contributors https://js.foundation
|
|
67
59
|
dev,multer,MIT,Copyright 2014 Hage Yaapa
|
|
68
60
|
dev,nock,MIT,Copyright 2017 Pedro Teixeira and other contributors
|
|
69
61
|
dev,nyc,ISC,Copyright 2015 Contributors
|
|
62
|
+
dev,octokit,MIT,Copyright 2023 Octokit contributors
|
|
70
63
|
dev,proxyquire,MIT,Copyright 2013 Thorsten Lorenz
|
|
71
64
|
dev,rimraf,ISC,Copyright Isaac Z. Schlueter and Contributors
|
|
72
65
|
dev,semver,ISC,Copyright Isaac Z. Schlueter and Contributors
|
|
@@ -75,6 +68,7 @@ dev,sinon-chai,WTFPL and BSD-2-Clause,Copyright 2004 Sam Hocevar 2012–2017 Dom
|
|
|
75
68
|
dev,tap,ISC,Copyright 2011-2022 Isaac Z. Schlueter and Contributors
|
|
76
69
|
dev,tiktoken,MIT,Copyright (c) 2022 OpenAI, Shantanu Jain
|
|
77
70
|
dev,yaml,ISC,Copyright Eemeli Aro <eemeli@gmail.com>
|
|
71
|
+
dev,yarn-deduplicate,Apache license 2.0,Copyright [yyyy] [name of copyright owner]
|
|
78
72
|
file,aws-lambda-nodejs-runtime-interface-client,Apache 2.0,Copyright 2019 Amazon.com Inc. or its affiliates. All Rights Reserved.
|
|
79
73
|
file,profile.proto,Apache license 2.0,Copyright 2016 Google Inc.
|
|
80
74
|
file,is-git-url,MIT,Copyright (c) 2017 Jon Schlinkert.
|
package/README.md
CHANGED
|
@@ -15,13 +15,18 @@
|
|
|
15
15
|
Most of the documentation for `dd-trace` is available on these webpages:
|
|
16
16
|
|
|
17
17
|
- [Tracing Node.js Applications](https://docs.datadoghq.com/tracing/languages/nodejs/) - most project documentation, including setup instructions
|
|
18
|
-
- [Configuring the
|
|
18
|
+
- [Configuring the Node.js Tracing Library](https://docs.datadoghq.com/tracing/trace_collection/library_config/nodejs) - environment variables and config options
|
|
19
19
|
- [API Documentation](https://datadog.github.io/dd-trace-js) - method signatures, plugin list, and some usage examples
|
|
20
20
|
- [APM Terms and Concepts](https://docs.datadoghq.com/tracing/visualization/) - a glossary of concepts applicable across all languages
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
## Version Release Lines and Maintenance
|
|
24
24
|
|
|
25
|
+
> **Node.js v24 Notice**: We're currently adding compatibility for Node.js v24. To use the tracer with your application either continue to use Node.js v22 (LTS), or do both of the following as a workaround:
|
|
26
|
+
> * Install v5.52.0 (or newer) of the tracer
|
|
27
|
+
> * Set `--no-async-context-frame` either using a CLI argument or via `NODE_OPTIONS`
|
|
28
|
+
> Once support for Node.js v24 is complete this flag will no longer be needed.
|
|
29
|
+
|
|
25
30
|
| Release Line | Latest Version | Node.js | [SSI](https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/single-step-apm/?tab=linuxhostorvm) | [K8s Injection](https://docs.datadoghq.com/tracing/trace_collection/library_injection_local/?tab=kubernetes) |Status |Initial Release | End of Life |
|
|
26
31
|
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
27
32
|
| [`v1`](https://github.com/DataDog/dd-trace-js/tree/v1.x) |  | `>= v12` | NO | NO | **EOL** | 2021-07-13 | 2022-02-25 |
|
|
@@ -59,7 +64,7 @@ When a new release line is introduced the previous release line then enters main
|
|
|
59
64
|
Once that year is up the release line enters End of Life and will not receive new updates.
|
|
60
65
|
The library also follows the Node.js LTS lifecycle wherein new release lines drop compatibility with Node.js versions that reach end-of-life (with the maintenance release line still receiving updates for a year).
|
|
61
66
|
|
|
62
|
-
For more information about library versioning and compatibility, see the [
|
|
67
|
+
For more information about library versioning and compatibility, see the [Node.js Compatibility Requirements](https://docs.datadoghq.com/tracing/trace_collection/compatibility/nodejs/#releases) page.
|
|
63
68
|
|
|
64
69
|
Changes associated with each individual release are documented on the [GitHub Releases](https://github.com/DataDog/dd-trace-js/releases) screen.
|
|
65
70
|
|
|
@@ -69,21 +74,11 @@ Changes associated with each individual release are documented on the [GitHub Re
|
|
|
69
74
|
Please read the [CONTRIBUTING.md](https://github.com/DataDog/dd-trace-js/blob/master/CONTRIBUTING.md) document before contributing to this open source project.
|
|
70
75
|
|
|
71
76
|
|
|
72
|
-
##
|
|
73
|
-
|
|
74
|
-
ESM support requires an additional command-line argument. Use the following to enable experimental ESM support with your application:
|
|
75
|
-
|
|
76
|
-
Node.js < v20.6
|
|
77
|
-
|
|
78
|
-
```sh
|
|
79
|
-
node --loader dd-trace/loader-hook.mjs entrypoint.js
|
|
80
|
-
```
|
|
77
|
+
## ECMAScript Modules (ESM) Support
|
|
81
78
|
|
|
82
|
-
Node.js
|
|
79
|
+
ESM support requires an _additional_ command line argument when starting the Node.js process.
|
|
80
|
+
For more information, see the [section on ESM support](https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/nodejs/#esm-applications-only-import-the-loader) in the Node.js tracer documentation.
|
|
83
81
|
|
|
84
|
-
```sh
|
|
85
|
-
node --import dd-trace/register.js entrypoint.js
|
|
86
|
-
```
|
|
87
82
|
|
|
88
83
|
## Serverless / Lambda
|
|
89
84
|
|
package/ci/cypress/plugin.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
const { NODE_MAJOR } = require('../../version')
|
|
2
|
+
|
|
3
|
+
// These polyfills are here because cypress@6.7.0, which we still support for v5, runs its plugin code
|
|
4
|
+
// with Node.js@12.
|
|
5
|
+
if (NODE_MAJOR < 18) {
|
|
6
|
+
require('./polyfills')
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
require('../init')
|
|
2
10
|
|
|
3
11
|
module.exports = require('../../packages/datadog-plugin-cypress/src/plugin')
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
if (!Object.hasOwn) {
|
|
2
|
+
Object.defineProperty(Object, 'hasOwn', {
|
|
3
|
+
// eslint-disable-next-line prefer-object-has-own
|
|
4
|
+
value: (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop),
|
|
5
|
+
writable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
})
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (!Array.prototype.at) {
|
|
11
|
+
// eslint-disable-next-line no-extend-native
|
|
12
|
+
Object.defineProperty(Array.prototype, 'at', {
|
|
13
|
+
value: function (n) {
|
|
14
|
+
const len = this.length
|
|
15
|
+
if (len === 0) return
|
|
16
|
+
let index = Math.trunc(n)
|
|
17
|
+
if (index < 0) index += len
|
|
18
|
+
return (index < 0 || index >= len) ? undefined : this[index]
|
|
19
|
+
},
|
|
20
|
+
writable: true,
|
|
21
|
+
configurable: true
|
|
22
|
+
})
|
|
23
|
+
}
|
package/ci/init.js
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
const tracer = require('../packages/dd-trace')
|
|
3
3
|
const { isTrue, isFalse } = require('../packages/dd-trace/src/util')
|
|
4
4
|
const log = require('../packages/dd-trace/src/log')
|
|
5
|
+
const { getEnvironmentVariable } = require('../packages/dd-trace/src/config-helper')
|
|
5
6
|
|
|
6
|
-
const isJestWorker = !!
|
|
7
|
-
const isCucumberWorker = !!
|
|
8
|
-
const isMochaWorker = !!
|
|
7
|
+
const isJestWorker = !!getEnvironmentVariable('JEST_WORKER_ID')
|
|
8
|
+
const isCucumberWorker = !!getEnvironmentVariable('CUCUMBER_WORKER_ID')
|
|
9
|
+
const isMochaWorker = !!getEnvironmentVariable('MOCHA_WORKER_ID')
|
|
10
|
+
|
|
11
|
+
const isPlaywrightWorker = !!getEnvironmentVariable('DD_PLAYWRIGHT_WORKER')
|
|
9
12
|
|
|
10
13
|
const packageManagers = [
|
|
11
14
|
'npm',
|
|
@@ -23,17 +26,17 @@ const options = {
|
|
|
23
26
|
flushInterval: isJestWorker ? 0 : 5000
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
let shouldInit = !isFalse(
|
|
29
|
+
let shouldInit = !isFalse(getEnvironmentVariable('DD_CIVISIBILITY_ENABLED'))
|
|
27
30
|
|
|
28
31
|
if (isPackageManager()) {
|
|
29
32
|
log.debug('dd-trace is not initialized in a package manager.')
|
|
30
33
|
shouldInit = false
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
const isAgentlessEnabled = isTrue(
|
|
36
|
+
const isAgentlessEnabled = isTrue(getEnvironmentVariable('DD_CIVISIBILITY_AGENTLESS_ENABLED'))
|
|
34
37
|
|
|
35
38
|
if (isAgentlessEnabled) {
|
|
36
|
-
if (
|
|
39
|
+
if (getEnvironmentVariable('DD_API_KEY')) {
|
|
37
40
|
options.experimental = {
|
|
38
41
|
exporter: 'datadog'
|
|
39
42
|
}
|
|
@@ -67,6 +70,12 @@ if (isMochaWorker) {
|
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
if (isPlaywrightWorker) {
|
|
74
|
+
options.experimental = {
|
|
75
|
+
exporter: 'playwright_worker'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
if (shouldInit) {
|
|
71
80
|
tracer.init(options)
|
|
72
81
|
tracer.use('fs', false)
|
package/ext/exporters.d.ts
CHANGED
package/ext/exporters.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -138,6 +138,22 @@ interface Tracer extends opentracing.Tracer {
|
|
|
138
138
|
* LLM Observability SDK
|
|
139
139
|
*/
|
|
140
140
|
llmobs: tracer.llmobs.LLMObs;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @experimental
|
|
144
|
+
* Provide same functionality as OpenTelemetry Baggage:
|
|
145
|
+
* https://opentelemetry.io/docs/concepts/signals/baggage/
|
|
146
|
+
*
|
|
147
|
+
* Since the equivalent of OTel Context is implicit in dd-trace-js,
|
|
148
|
+
* these APIs act on the currently active baggage
|
|
149
|
+
*
|
|
150
|
+
* Work with storage('baggage'), therefore do not follow the same continuity as other APIs
|
|
151
|
+
*/
|
|
152
|
+
setBaggageItem (key: string, value: string): Record<string, string>;
|
|
153
|
+
getBaggageItem (key: string): string | undefined;
|
|
154
|
+
getAllBaggageItems (): Record<string, string>;
|
|
155
|
+
removeBaggageItem (key: string): Record<string, string>;
|
|
156
|
+
removeAllBaggageItems (): Record<string, string>;
|
|
141
157
|
}
|
|
142
158
|
|
|
143
159
|
// left out of the namespace, so it
|
|
@@ -154,6 +170,7 @@ interface Plugins {
|
|
|
154
170
|
"bunyan": tracer.plugins.bunyan;
|
|
155
171
|
"cassandra-driver": tracer.plugins.cassandra_driver;
|
|
156
172
|
"child_process": tracer.plugins.child_process;
|
|
173
|
+
"confluentinc-kafka-javascript": tracer.plugins.confluentinc_kafka_javascript;
|
|
157
174
|
"connect": tracer.plugins.connect;
|
|
158
175
|
"couchbase": tracer.plugins.couchbase;
|
|
159
176
|
"cucumber": tracer.plugins.cucumber;
|
|
@@ -165,12 +182,14 @@ interface Plugins {
|
|
|
165
182
|
"fetch": tracer.plugins.fetch;
|
|
166
183
|
"generic-pool": tracer.plugins.generic_pool;
|
|
167
184
|
"google-cloud-pubsub": tracer.plugins.google_cloud_pubsub;
|
|
185
|
+
"google-cloud-vertexai": tracer.plugins.google_cloud_vertexai;
|
|
168
186
|
"graphql": tracer.plugins.graphql;
|
|
169
187
|
"grpc": tracer.plugins.grpc;
|
|
170
188
|
"hapi": tracer.plugins.hapi;
|
|
171
189
|
"http": tracer.plugins.http;
|
|
172
190
|
"http2": tracer.plugins.http2;
|
|
173
191
|
"ioredis": tracer.plugins.ioredis;
|
|
192
|
+
"iovalkey": tracer.plugins.iovalkey;
|
|
174
193
|
"jest": tracer.plugins.jest;
|
|
175
194
|
"kafkajs": tracer.plugins.kafkajs
|
|
176
195
|
"knex": tracer.plugins.knex;
|
|
@@ -190,7 +209,6 @@ interface Plugins {
|
|
|
190
209
|
"openai": tracer.plugins.openai;
|
|
191
210
|
"opensearch": tracer.plugins.opensearch;
|
|
192
211
|
"oracledb": tracer.plugins.oracledb;
|
|
193
|
-
"paperplane": tracer.plugins.paperplane;
|
|
194
212
|
"playwright": tracer.plugins.playwright;
|
|
195
213
|
"pg": tracer.plugins.pg;
|
|
196
214
|
"pino": tracer.plugins.pino;
|
|
@@ -345,6 +363,12 @@ declare namespace tracer {
|
|
|
345
363
|
* List of options available to the tracer.
|
|
346
364
|
*/
|
|
347
365
|
export interface TracerOptions {
|
|
366
|
+
/**
|
|
367
|
+
* Used to disable APM Tracing when using standalone products
|
|
368
|
+
* @default true
|
|
369
|
+
*/
|
|
370
|
+
apmTracingEnabled?: boolean
|
|
371
|
+
|
|
348
372
|
/**
|
|
349
373
|
* Whether to enable trace ID injection in log records to be able to correlate
|
|
350
374
|
* traces with logs.
|
|
@@ -432,7 +456,7 @@ declare namespace tracer {
|
|
|
432
456
|
rateLimit?: number,
|
|
433
457
|
|
|
434
458
|
/**
|
|
435
|
-
* Sampling rules to apply to priority
|
|
459
|
+
* Sampling rules to apply to priority sampling. Each rule is a JSON,
|
|
436
460
|
* consisting of `service` and `name`, which are regexes to match against
|
|
437
461
|
* a trace's `service` and `name`, and a corresponding `sampleRate`. If not
|
|
438
462
|
* specified, will defer to global sampling rate for all spans.
|
|
@@ -528,6 +552,9 @@ declare namespace tracer {
|
|
|
528
552
|
appsec?: {
|
|
529
553
|
/**
|
|
530
554
|
* Configuration of Standalone ASM mode
|
|
555
|
+
* Deprecated in favor of `apmTracingEnabled`.
|
|
556
|
+
*
|
|
557
|
+
* @deprecated
|
|
531
558
|
*/
|
|
532
559
|
standalone?: {
|
|
533
560
|
/**
|
|
@@ -686,7 +713,12 @@ declare namespace tracer {
|
|
|
686
713
|
/** Whether to enable RASP.
|
|
687
714
|
* @default false
|
|
688
715
|
*/
|
|
689
|
-
enabled?: boolean
|
|
716
|
+
enabled?: boolean,
|
|
717
|
+
|
|
718
|
+
/** Whether to enable request body collection on RASP event
|
|
719
|
+
* @default false
|
|
720
|
+
*/
|
|
721
|
+
bodyCollection?: boolean
|
|
690
722
|
},
|
|
691
723
|
/**
|
|
692
724
|
* Configuration for stack trace reporting
|
|
@@ -706,8 +738,38 @@ declare namespace tracer {
|
|
|
706
738
|
* @default 32
|
|
707
739
|
*/
|
|
708
740
|
maxDepth?: number,
|
|
741
|
+
},
|
|
742
|
+
/**
|
|
743
|
+
* Configuration for extended headers collection tied to security events
|
|
744
|
+
*/
|
|
745
|
+
extendedHeadersCollection?: {
|
|
746
|
+
/** Whether to enable extended headers collection
|
|
747
|
+
* @default false
|
|
748
|
+
*/
|
|
749
|
+
enabled: boolean,
|
|
750
|
+
|
|
751
|
+
/** Whether to redact collected headers
|
|
752
|
+
* @default true
|
|
753
|
+
*/
|
|
754
|
+
redaction: boolean,
|
|
755
|
+
|
|
756
|
+
/** Specifies the maximum number of headers collected.
|
|
757
|
+
* @default 50
|
|
758
|
+
*/
|
|
759
|
+
maxHeaders: number,
|
|
709
760
|
}
|
|
710
|
-
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Configuration for Code Origin for Spans.
|
|
765
|
+
*/
|
|
766
|
+
codeOriginForSpans?: {
|
|
767
|
+
/**
|
|
768
|
+
* Whether to enable Code Origin for Spans.
|
|
769
|
+
* @default true
|
|
770
|
+
*/
|
|
771
|
+
enabled?: boolean
|
|
772
|
+
}
|
|
711
773
|
|
|
712
774
|
/**
|
|
713
775
|
* Configuration of the IAST. Can be a boolean as an alias to `iast.enabled`.
|
|
@@ -762,7 +824,7 @@ declare namespace tracer {
|
|
|
762
824
|
}
|
|
763
825
|
|
|
764
826
|
/**
|
|
765
|
-
* Configuration enabling LLM Observability. Enablement is
|
|
827
|
+
* Configuration enabling LLM Observability. Enablement is superseded by the DD_LLMOBS_ENABLED environment variable.
|
|
766
828
|
*/
|
|
767
829
|
llmobs?: llmobs.LLMObsEnableOptions
|
|
768
830
|
}
|
|
@@ -813,43 +875,43 @@ declare namespace tracer {
|
|
|
813
875
|
export interface DogStatsD {
|
|
814
876
|
/**
|
|
815
877
|
* Increments a metric by the specified value, optionally specifying tags.
|
|
816
|
-
* @param
|
|
817
|
-
* @param
|
|
818
|
-
* @param
|
|
878
|
+
* @param stat The dot-separated metric name.
|
|
879
|
+
* @param value The amount to increment the stat by.
|
|
880
|
+
* @param tags Tags to pass along, such as `{ foo: 'bar' }`. Values are combined with config.tags.
|
|
819
881
|
*/
|
|
820
|
-
increment(stat: string, value?: number, tags?:
|
|
882
|
+
increment(stat: string, value?: number, tags?: Record<string, string|number> | string[]): void
|
|
821
883
|
|
|
822
884
|
/**
|
|
823
885
|
* Decrements a metric by the specified value, optionally specifying tags.
|
|
824
|
-
* @param
|
|
825
|
-
* @param
|
|
826
|
-
* @param
|
|
886
|
+
* @param stat The dot-separated metric name.
|
|
887
|
+
* @param value The amount to decrement the stat by.
|
|
888
|
+
* @param tags Tags to pass along, such as `{ foo: 'bar' }`. Values are combined with config.tags.
|
|
827
889
|
*/
|
|
828
|
-
decrement(stat: string, value?: number, tags?:
|
|
890
|
+
decrement(stat: string, value?: number, tags?: Record<string, string|number> | string[]): void
|
|
829
891
|
|
|
830
892
|
/**
|
|
831
893
|
* Sets a distribution value, optionally specifying tags.
|
|
832
|
-
* @param
|
|
833
|
-
* @param
|
|
834
|
-
* @param
|
|
894
|
+
* @param stat The dot-separated metric name.
|
|
895
|
+
* @param value The amount to increment the stat by.
|
|
896
|
+
* @param tags Tags to pass along, such as `{ foo: 'bar' }`. Values are combined with config.tags.
|
|
835
897
|
*/
|
|
836
|
-
distribution(stat: string, value?: number, tags?:
|
|
898
|
+
distribution(stat: string, value?: number, tags?: Record<string, string|number> | string[]): void
|
|
837
899
|
|
|
838
900
|
/**
|
|
839
901
|
* Sets a gauge value, optionally specifying tags.
|
|
840
|
-
* @param
|
|
841
|
-
* @param
|
|
842
|
-
* @param
|
|
902
|
+
* @param stat The dot-separated metric name.
|
|
903
|
+
* @param value The amount to increment the stat by.
|
|
904
|
+
* @param tags Tags to pass along, such as `{ foo: 'bar' }`. Values are combined with config.tags.
|
|
843
905
|
*/
|
|
844
|
-
gauge(stat: string, value?: number, tags?:
|
|
906
|
+
gauge(stat: string, value?: number, tags?: Record<string, string|number> | string[]): void
|
|
845
907
|
|
|
846
908
|
/**
|
|
847
909
|
* Sets a histogram value, optionally specifying tags.
|
|
848
|
-
* @param
|
|
849
|
-
* @param
|
|
850
|
-
* @param
|
|
910
|
+
* @param stat The dot-separated metric name.
|
|
911
|
+
* @param value The amount to increment the stat by.
|
|
912
|
+
* @param tags Tags to pass along, such as `{ foo: 'bar' }`. Values are combined with config.tags.
|
|
851
913
|
*/
|
|
852
|
-
histogram(stat: string, value?: number, tags?:
|
|
914
|
+
histogram(stat: string, value?: number, tags?: Record<string, string|number> | string[]): void
|
|
853
915
|
|
|
854
916
|
/**
|
|
855
917
|
* Forces any unsent metrics to be sent
|
|
@@ -859,6 +921,39 @@ declare namespace tracer {
|
|
|
859
921
|
flush(): void
|
|
860
922
|
}
|
|
861
923
|
|
|
924
|
+
export interface EventTrackingV2 {
|
|
925
|
+
/**
|
|
926
|
+
* Links a successful login event to the current trace. Will link the passed user to the current trace with Appsec.setUser() internally.
|
|
927
|
+
* @param {string} login The login key (username, email...) used by the user to authenticate.
|
|
928
|
+
* @param {User} user Properties of the authenticated user. Accepts custom fields. Can be null.
|
|
929
|
+
* @param {any} metadata Custom fields to link to the login success event.
|
|
930
|
+
*/
|
|
931
|
+
trackUserLoginSuccess(login: string, user?: User | null, metadata?: any): void;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Links a successful login event to the current trace. Will link the passed user to the current trace with Appsec.setUser() internally.
|
|
935
|
+
* @param {string} login The login key (username, email...) used by the user to authenticate.
|
|
936
|
+
* @param {string} userId Identifier of the authenticated user.
|
|
937
|
+
* @param {any} metadata Custom fields to link to the login success event.
|
|
938
|
+
*/
|
|
939
|
+
trackUserLoginSuccess(login: string, userId: string, metadata?: any): void;
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Links a failed login event to the current trace.
|
|
943
|
+
* @param {string} login The login key (username, email...) used by the user to authenticate.
|
|
944
|
+
* @param {boolean} exists If the user exists.
|
|
945
|
+
* @param {any} metadata Custom fields to link to the login failure event.
|
|
946
|
+
*/
|
|
947
|
+
trackUserLoginFailure(login: string, exists: boolean, metadata?: any): void;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Links a failed login event to the current trace.
|
|
951
|
+
* @param {string} login The login key (username, email...) used by the user to authenticate.
|
|
952
|
+
* @param {any} metadata Custom fields to link to the login failure event.
|
|
953
|
+
*/
|
|
954
|
+
trackUserLoginFailure(login: string, metadata?: any): void;
|
|
955
|
+
}
|
|
956
|
+
|
|
862
957
|
export interface Appsec {
|
|
863
958
|
/**
|
|
864
959
|
* Links a successful login event to the current trace. Will link the passed user to the current trace with Appsec.setUser() internally.
|
|
@@ -866,16 +961,20 @@ declare namespace tracer {
|
|
|
866
961
|
* @param {[key: string]: string} metadata Custom fields to link to the login success event.
|
|
867
962
|
*
|
|
868
963
|
* @beta This method is in beta and could change in future versions.
|
|
964
|
+
*
|
|
965
|
+
* @deprecated In favor of eventTrackingV2.trackUserLoginSuccess
|
|
869
966
|
*/
|
|
870
967
|
trackUserLoginSuccessEvent(user: User, metadata?: { [key: string]: string }): void
|
|
871
968
|
|
|
872
969
|
/**
|
|
873
970
|
* Links a failed login event to the current trace.
|
|
874
|
-
* @param {string} userId The user id of the
|
|
971
|
+
* @param {string} userId The user id of the attempted login.
|
|
875
972
|
* @param {boolean} exists If the user id exists.
|
|
876
973
|
* @param {[key: string]: string} metadata Custom fields to link to the login failure event.
|
|
877
974
|
*
|
|
878
975
|
* @beta This method is in beta and could change in future versions.
|
|
976
|
+
*
|
|
977
|
+
* @deprecated In favor of eventTrackingV2.trackUserLoginFailure
|
|
879
978
|
*/
|
|
880
979
|
trackUserLoginFailureEvent(userId: string, exists: boolean, metadata?: { [key: string]: string }): void
|
|
881
980
|
|
|
@@ -916,6 +1015,8 @@ declare namespace tracer {
|
|
|
916
1015
|
* @beta This method is in beta and could change in the future
|
|
917
1016
|
*/
|
|
918
1017
|
setUser(user: User): void
|
|
1018
|
+
|
|
1019
|
+
eventTrackingV2: EventTrackingV2
|
|
919
1020
|
}
|
|
920
1021
|
|
|
921
1022
|
/** @hidden */
|
|
@@ -1285,6 +1386,12 @@ declare namespace tracer {
|
|
|
1285
1386
|
*/
|
|
1286
1387
|
interface child_process extends Instrumentation {}
|
|
1287
1388
|
|
|
1389
|
+
/**
|
|
1390
|
+
* This plugin automatically instruments the
|
|
1391
|
+
* [confluentinc-kafka-javascript](https://github.com/confluentinc/confluent-kafka-js) module.
|
|
1392
|
+
*/
|
|
1393
|
+
interface confluentinc_kafka_javascript extends Instrumentation {}
|
|
1394
|
+
|
|
1288
1395
|
/**
|
|
1289
1396
|
* This plugin automatically instruments the
|
|
1290
1397
|
* [connect](https://github.com/senchalabs/connect) module.
|
|
@@ -1361,6 +1468,12 @@ declare namespace tracer {
|
|
|
1361
1468
|
*/
|
|
1362
1469
|
interface google_cloud_pubsub extends Integration {}
|
|
1363
1470
|
|
|
1471
|
+
/**
|
|
1472
|
+
* This plugin automatically instruments the
|
|
1473
|
+
* [@google-cloud/vertexai](https://github.com/googleapis/nodejs-vertexai) module.
|
|
1474
|
+
*/
|
|
1475
|
+
interface google_cloud_vertexai extends Integration {}
|
|
1476
|
+
|
|
1364
1477
|
/** @hidden */
|
|
1365
1478
|
interface ExecutionArgs {
|
|
1366
1479
|
schema: any,
|
|
@@ -1408,7 +1521,7 @@ declare namespace tracer {
|
|
|
1408
1521
|
|
|
1409
1522
|
/**
|
|
1410
1523
|
* Whether to include the source of the operation within the query as a tag
|
|
1411
|
-
* on every span. This may contain sensitive information and
|
|
1524
|
+
* on every span. This may contain sensitive information and should only be
|
|
1412
1525
|
* enabled if sensitive data is always sent as variables and not in the
|
|
1413
1526
|
* query text.
|
|
1414
1527
|
*
|
|
@@ -1577,6 +1690,53 @@ declare namespace tracer {
|
|
|
1577
1690
|
splitByInstance?: boolean;
|
|
1578
1691
|
}
|
|
1579
1692
|
|
|
1693
|
+
/**
|
|
1694
|
+
* This plugin automatically instruments the
|
|
1695
|
+
* [iovalkey](https://github.com/valkey-io/iovalkey) module.
|
|
1696
|
+
*/
|
|
1697
|
+
interface iovalkey extends Instrumentation {
|
|
1698
|
+
/**
|
|
1699
|
+
* List of commands that should be instrumented. Commands must be in
|
|
1700
|
+
* lowercase for example 'xread'.
|
|
1701
|
+
*
|
|
1702
|
+
* @default /^.*$/
|
|
1703
|
+
*/
|
|
1704
|
+
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Deprecated in favor of `allowlist`.
|
|
1708
|
+
*
|
|
1709
|
+
* @deprecated
|
|
1710
|
+
* @hidden
|
|
1711
|
+
*/
|
|
1712
|
+
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* List of commands that should not be instrumented. Takes precedence over
|
|
1716
|
+
* allowlist if a command matches an entry in both. Commands must be in
|
|
1717
|
+
* lowercase for example 'xread'.
|
|
1718
|
+
*
|
|
1719
|
+
* @default []
|
|
1720
|
+
*/
|
|
1721
|
+
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* Deprecated in favor of `blocklist`.
|
|
1725
|
+
*
|
|
1726
|
+
* @deprecated
|
|
1727
|
+
* @hidden
|
|
1728
|
+
*/
|
|
1729
|
+
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Whether to use a different service name for each Redis instance based
|
|
1733
|
+
* on the configured connection name of the client.
|
|
1734
|
+
*
|
|
1735
|
+
* @default false
|
|
1736
|
+
*/
|
|
1737
|
+
splitByInstance?: boolean;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1580
1740
|
/**
|
|
1581
1741
|
* This plugin automatically instruments the
|
|
1582
1742
|
* [jest](https://github.com/jestjs/jest) module.
|
|
@@ -1739,12 +1899,6 @@ declare namespace tracer {
|
|
|
1739
1899
|
service?: string | ((params: any) => string);
|
|
1740
1900
|
}
|
|
1741
1901
|
|
|
1742
|
-
/**
|
|
1743
|
-
* This plugin automatically instruments the
|
|
1744
|
-
* [paperplane](https://github.com/articulate/paperplane) module.
|
|
1745
|
-
*/
|
|
1746
|
-
interface paperplane extends HttpServer {}
|
|
1747
|
-
|
|
1748
1902
|
/**
|
|
1749
1903
|
* This plugin automatically instruments the
|
|
1750
1904
|
* [playwright](https://github.com/microsoft/playwright) module.
|
|
@@ -2196,6 +2350,7 @@ declare namespace tracer {
|
|
|
2196
2350
|
/**
|
|
2197
2351
|
* Defines the pattern to ignore cookie names in the vulnerability hash calculation
|
|
2198
2352
|
* @default ".{32,}"
|
|
2353
|
+
* @deprecated This property has no effect because hash calculation algorithm has been updated for cookie vulnerabilities
|
|
2199
2354
|
*/
|
|
2200
2355
|
cookieFilterPattern?: string,
|
|
2201
2356
|
|
|
@@ -2331,7 +2486,7 @@ declare namespace tracer {
|
|
|
2331
2486
|
* ```javascript
|
|
2332
2487
|
* llmobs.trace({ kind: 'llm', name: 'myLLM', modelName: 'gpt-4o', modelProvider: 'openai' }, () => {
|
|
2333
2488
|
* llmobs.annotate({
|
|
2334
|
-
* inputData: [{ content: 'system prompt, role: 'system' }, { content: 'user prompt', role: 'user' }],
|
|
2489
|
+
* inputData: [{ content: 'system prompt', role: 'system' }, { content: 'user prompt', role: 'user' }],
|
|
2335
2490
|
* outputData: { content: 'response', role: 'ai' },
|
|
2336
2491
|
* metadata: { temperature: 0.7 },
|
|
2337
2492
|
* tags: { host: 'localhost' },
|
|
@@ -2347,7 +2502,7 @@ declare namespace tracer {
|
|
|
2347
2502
|
annotate (span: tracer.Span | undefined, options: llmobs.AnnotationOptions): void
|
|
2348
2503
|
|
|
2349
2504
|
/**
|
|
2350
|
-
* Submits a custom
|
|
2505
|
+
* Submits a custom evaluation metric for a given span ID and trace ID.
|
|
2351
2506
|
* @param spanContext The span context of the span to submit the evaluation metric for.
|
|
2352
2507
|
* @param options An object containing the label, metric type, value, and tags of the evaluation metric.
|
|
2353
2508
|
*/
|
|
@@ -2361,7 +2516,7 @@ declare namespace tracer {
|
|
|
2361
2516
|
|
|
2362
2517
|
interface EvaluationOptions {
|
|
2363
2518
|
/**
|
|
2364
|
-
* The name of the
|
|
2519
|
+
* The name of the evaluation metric
|
|
2365
2520
|
*/
|
|
2366
2521
|
label: string,
|
|
2367
2522
|
|
|
@@ -2485,7 +2640,7 @@ declare namespace tracer {
|
|
|
2485
2640
|
metadata?: { [key: string]: any },
|
|
2486
2641
|
|
|
2487
2642
|
/**
|
|
2488
|
-
* Object of JSON
|
|
2643
|
+
* Object of JSON serializable key-value metrics (number) pairs, such as `{input,output,total}Tokens`
|
|
2489
2644
|
*/
|
|
2490
2645
|
metrics?: { [key: string]: number },
|
|
2491
2646
|
|
|
@@ -2523,7 +2678,7 @@ declare namespace tracer {
|
|
|
2523
2678
|
|
|
2524
2679
|
/**
|
|
2525
2680
|
* The name of the ML application that the agent is orchestrating.
|
|
2526
|
-
* If not provided, the default value will be set to mlApp provided during
|
|
2681
|
+
* If not provided, the default value will be set to mlApp provided during initialization, or `DD_LLMOBS_ML_APP`.
|
|
2527
2682
|
*/
|
|
2528
2683
|
mlApp?: string,
|
|
2529
2684
|
|
|
@@ -2563,7 +2718,7 @@ declare namespace tracer {
|
|
|
2563
2718
|
mlApp?: string,
|
|
2564
2719
|
|
|
2565
2720
|
/**
|
|
2566
|
-
* Set to `true` to
|
|
2721
|
+
* Set to `true` to disable sending data that requires a Datadog Agent.
|
|
2567
2722
|
*/
|
|
2568
2723
|
agentlessEnabled?: boolean,
|
|
2569
2724
|
}
|