dd-trace 5.104.0 → 5.106.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 +90 -102
- package/index.d.ts +82 -3
- package/package.json +15 -15
- package/packages/datadog-core/src/storage.js +1 -1
- package/packages/datadog-instrumentations/src/aerospike.js +1 -1
- package/packages/datadog-instrumentations/src/ai.js +8 -7
- package/packages/datadog-instrumentations/src/aws-sdk.js +16 -2
- package/packages/datadog-instrumentations/src/azure-cosmos.js +7 -0
- package/packages/datadog-instrumentations/src/azure-functions.js +3 -0
- package/packages/datadog-instrumentations/src/cucumber-worker-threads.js +19 -0
- package/packages/datadog-instrumentations/src/cucumber.js +390 -157
- package/packages/datadog-instrumentations/src/dns.js +54 -18
- package/packages/datadog-instrumentations/src/fastify.js +142 -82
- package/packages/datadog-instrumentations/src/graphql.js +188 -62
- package/packages/datadog-instrumentations/src/helpers/ai-messages.js +322 -14
- package/packages/datadog-instrumentations/src/helpers/hooks.js +4 -0
- package/packages/datadog-instrumentations/src/helpers/instrument.js +2 -1
- package/packages/datadog-instrumentations/src/helpers/openai-ai-guard.js +269 -0
- package/packages/datadog-instrumentations/src/helpers/promise-instrumentor.js +42 -0
- package/packages/datadog-instrumentations/src/helpers/register.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +2 -3
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/azure-cosmos.js +50 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +2 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langgraph.js +4 -2
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/playwright.js +85 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +37 -236
- package/packages/datadog-instrumentations/src/hono.js +54 -3
- package/packages/datadog-instrumentations/src/http/server.js +9 -4
- package/packages/datadog-instrumentations/src/jest/coverage-backfill.js +163 -0
- package/packages/datadog-instrumentations/src/jest.js +360 -150
- package/packages/datadog-instrumentations/src/kafkajs.js +120 -16
- package/packages/datadog-instrumentations/src/mocha/main.js +128 -17
- package/packages/datadog-instrumentations/src/nats.js +182 -0
- package/packages/datadog-instrumentations/src/nyc.js +38 -1
- package/packages/datadog-instrumentations/src/openai.js +33 -18
- package/packages/datadog-instrumentations/src/oracledb.js +6 -1
- package/packages/datadog-instrumentations/src/pino.js +17 -5
- package/packages/datadog-instrumentations/src/playwright.js +515 -292
- package/packages/datadog-instrumentations/src/router.js +76 -32
- package/packages/datadog-instrumentations/src/stripe.js +1 -1
- package/packages/datadog-plugin-avsc/src/schema_iterator.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/tracing.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/utils.js +218 -4
- package/packages/datadog-plugin-azure-cosmos/src/index.js +144 -0
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +1 -1
- package/packages/datadog-plugin-azure-functions/src/index.js +5 -2
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +1 -1
- package/packages/datadog-plugin-bunyan/src/index.js +28 -0
- package/packages/datadog-plugin-cucumber/src/index.js +17 -3
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +199 -28
- package/packages/datadog-plugin-cypress/src/support.js +69 -1
- package/packages/datadog-plugin-dns/src/lookup.js +8 -6
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +1 -1
- package/packages/datadog-plugin-graphql/src/execute.js +2 -0
- package/packages/datadog-plugin-graphql/src/resolve.js +64 -67
- package/packages/datadog-plugin-http/src/server.js +40 -15
- package/packages/datadog-plugin-jest/src/index.js +11 -3
- package/packages/datadog-plugin-jest/src/util.js +15 -8
- package/packages/datadog-plugin-kafkajs/src/batch-consumer.js +1 -1
- package/packages/datadog-plugin-kafkajs/src/producer.js +3 -0
- package/packages/datadog-plugin-langgraph/src/stream.js +1 -1
- package/packages/datadog-plugin-mocha/src/index.js +19 -4
- package/packages/datadog-plugin-mongodb-core/src/index.js +281 -40
- package/packages/datadog-plugin-nats/src/consumer.js +43 -0
- package/packages/datadog-plugin-nats/src/index.js +20 -0
- package/packages/datadog-plugin-nats/src/producer.js +62 -0
- package/packages/datadog-plugin-nats/src/util.js +33 -0
- package/packages/datadog-plugin-next/src/index.js +5 -3
- package/packages/datadog-plugin-openai/src/tracing.js +15 -2
- package/packages/datadog-plugin-oracledb/src/index.js +13 -2
- package/packages/datadog-plugin-pino/src/index.js +42 -0
- package/packages/datadog-plugin-playwright/src/index.js +4 -4
- package/packages/datadog-plugin-protobufjs/src/schema_iterator.js +1 -1
- package/packages/datadog-plugin-rhea/src/producer.js +1 -1
- package/packages/datadog-plugin-router/src/index.js +33 -44
- package/packages/datadog-plugin-selenium/src/index.js +1 -1
- package/packages/datadog-plugin-vitest/src/index.js +5 -13
- package/packages/datadog-plugin-winston/src/index.js +30 -0
- package/packages/datadog-shimmer/src/shimmer.js +33 -40
- package/packages/dd-trace/src/aiguard/index.js +1 -1
- package/packages/dd-trace/src/aiguard/sdk.js +1 -1
- package/packages/dd-trace/src/appsec/api_security_sampler.js +1 -1
- package/packages/dd-trace/src/appsec/index.js +1 -1
- package/packages/dd-trace/src/appsec/reporter.js +5 -6
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/utils.js +1 -1
- package/packages/dd-trace/src/appsec/user_tracking.js +5 -4
- package/packages/dd-trace/src/baggage.js +7 -1
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +0 -1
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +25 -13
- package/packages/dd-trace/src/ci-visibility/test-optimization-cache.js +70 -6
- package/packages/dd-trace/src/config/generated-config-types.d.ts +6 -2
- package/packages/dd-trace/src/config/supported-configurations.json +27 -8
- package/packages/dd-trace/src/datastreams/writer.js +2 -4
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +5 -8
- package/packages/dd-trace/src/encode/0.4.js +124 -108
- package/packages/dd-trace/src/encode/0.5.js +114 -26
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +31 -23
- package/packages/dd-trace/src/encode/agentless-json.js +4 -2
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +32 -13
- package/packages/dd-trace/src/encode/span-stats.js +16 -16
- package/packages/dd-trace/src/encode/tags-processors.js +16 -0
- package/packages/dd-trace/src/id.js +15 -0
- package/packages/dd-trace/src/llmobs/plugins/ai/util.js +92 -6
- package/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js +43 -21
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +9 -7
- package/packages/dd-trace/src/llmobs/plugins/langgraph/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/openai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/sdk.js +0 -16
- package/packages/dd-trace/src/llmobs/span_processor.js +3 -3
- package/packages/dd-trace/src/llmobs/tagger.js +9 -1
- package/packages/dd-trace/src/llmobs/telemetry.js +1 -1
- package/packages/dd-trace/src/llmobs/util.js +66 -3
- package/packages/dd-trace/src/log/index.js +1 -1
- package/packages/dd-trace/src/msgpack/chunk.js +394 -10
- package/packages/dd-trace/src/msgpack/index.js +96 -2
- package/packages/dd-trace/src/openfeature/encoding.js +70 -0
- package/packages/dd-trace/src/openfeature/flagging_provider.js +20 -0
- package/packages/dd-trace/src/openfeature/span-enrichment-hook.js +143 -0
- package/packages/dd-trace/src/openfeature/span-enrichment.js +149 -0
- package/packages/dd-trace/src/opentelemetry/span-helpers.js +4 -3
- package/packages/dd-trace/src/opentelemetry/span.js +1 -1
- package/packages/dd-trace/src/opentelemetry/trace/otlp_transformer.js +22 -3
- package/packages/dd-trace/src/opentracing/propagation/log.js +18 -7
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +64 -77
- package/packages/dd-trace/src/opentracing/span.js +59 -19
- package/packages/dd-trace/src/opentracing/span_context.js +50 -3
- package/packages/dd-trace/src/plugins/ci_plugin.js +20 -20
- package/packages/dd-trace/src/plugins/database.js +7 -6
- package/packages/dd-trace/src/plugins/index.js +4 -0
- package/packages/dd-trace/src/plugins/log_injection.js +56 -0
- package/packages/dd-trace/src/plugins/log_plugin.js +3 -48
- package/packages/dd-trace/src/plugins/outbound.js +1 -1
- package/packages/dd-trace/src/plugins/plugin.js +15 -17
- package/packages/dd-trace/src/plugins/tracing.js +43 -5
- package/packages/dd-trace/src/plugins/util/test.js +236 -13
- package/packages/dd-trace/src/plugins/util/web.js +79 -65
- package/packages/dd-trace/src/priority_sampler.js +2 -2
- package/packages/dd-trace/src/profiling/config.js +10 -23
- package/packages/dd-trace/src/profiling/exporters/agent.js +11 -10
- package/packages/dd-trace/src/profiling/profiler.js +21 -11
- package/packages/dd-trace/src/profiling/profilers/wall.js +12 -7
- package/packages/dd-trace/src/sampling_rule.js +7 -7
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +10 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/source-resolver.js +46 -0
- package/packages/dd-trace/src/span_format.js +190 -58
- package/packages/dd-trace/src/spanleak.js +1 -1
- package/packages/dd-trace/src/standalone/index.js +3 -3
- package/packages/dd-trace/src/tagger.js +0 -2
- package/vendor/dist/@apm-js-collab/code-transformer/index.js +70 -39
- package/vendor/dist/@datadog/sketches-js/LICENSE +10 -36
- package/vendor/dist/@datadog/sketches-js/index.js +1 -1
- package/vendor/dist/protobufjs/index.js +1 -1
- package/vendor/dist/protobufjs/minimal/index.js +1 -1
- package/packages/dd-trace/src/msgpack/encoder.js +0 -308
- package/packages/dd-trace/src/plugins/structured_log_plugin.js +0 -9
package/LICENSE-3rdparty.csv
CHANGED
|
@@ -1,102 +1,90 @@
|
|
|
1
|
-
"component","origin","license","copyright"
|
|
2
|
-
"@apm-js-collab/code-transformer","https://github.com/nodejs/orchestrion-js","['Apache-2.0']","['nodejs']"
|
|
3
|
-
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
4
|
-
"@datadog/libdatadog","https://github.com/DataDog/libdatadog-nodejs","['Apache-2.0']","['Datadog Inc.']"
|
|
5
|
-
"@datadog/native-appsec","https://github.com/DataDog/dd-native-appsec-js","['Apache-2.0']","['Datadog Inc.']"
|
|
6
|
-
"@datadog/native-iast-taint-tracking","https://github.com/DataDog/dd-native-iast-taint-tracking-js","['Apache-2.0']","['Datadog Inc.']"
|
|
7
|
-
"@datadog/native-metrics","https://github.com/DataDog/dd-native-metrics-js","['Apache-2.0']","['Datadog Inc.']"
|
|
8
|
-
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
9
|
-
"@datadog/pprof","https://github.com/DataDog/pprof-nodejs","['Apache-2.0']","['Google Inc.']"
|
|
10
|
-
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","['DataDog']"
|
|
11
|
-
"@datadog/wasm-js-rewriter","https://github.com/DataDog/dd-wasm-js-rewriter","['Apache-2.0']","['Datadog Inc.']"
|
|
12
|
-
"@emnapi/core","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
|
|
13
|
-
"@emnapi/runtime","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
|
|
14
|
-
"@emnapi/wasi-threads","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
|
|
15
|
-
"@isaacs/ttlcache","https://github.com/isaacs/ttlcache","['BlueOak-1.0.0']","['Isaac Z. Schlueter']"
|
|
16
|
-
"@jsep-plugin/assignment","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
17
|
-
"@jsep-plugin/regex","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
18
|
-
"@napi-rs/wasm-runtime","https://github.com/napi-rs/napi-rs","['MIT']","['LongYinan']"
|
|
19
|
-
"@opentelemetry/api","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
20
|
-
"@opentelemetry/api-logs","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
21
|
-
"@opentelemetry/core","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
22
|
-
"@opentelemetry/resources","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
23
|
-
"@opentelemetry/semantic-conventions","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
24
|
-
"@oxc-parser/binding-android-arm-eabi","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
25
|
-
"@oxc-parser/binding-android-arm64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
26
|
-
"@oxc-parser/binding-darwin-arm64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
27
|
-
"@oxc-parser/binding-darwin-x64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
28
|
-
"@oxc-parser/binding-freebsd-x64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
29
|
-
"@oxc-parser/binding-linux-arm-gnueabihf","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
30
|
-
"@oxc-parser/binding-linux-arm-musleabihf","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
31
|
-
"@oxc-parser/binding-linux-arm64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
32
|
-
"@oxc-parser/binding-linux-arm64-musl","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
33
|
-
"@oxc-parser/binding-linux-ppc64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
34
|
-
"@oxc-parser/binding-linux-riscv64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
35
|
-
"@oxc-parser/binding-linux-riscv64-musl","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
36
|
-
"@oxc-parser/binding-linux-s390x-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
37
|
-
"@oxc-parser/binding-linux-x64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
38
|
-
"@oxc-parser/binding-linux-x64-musl","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
39
|
-
"@oxc-parser/binding-openharmony-arm64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
40
|
-
"@oxc-parser/binding-wasm32-wasi","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
41
|
-
"@oxc-parser/binding-win32-arm64-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
42
|
-
"@oxc-parser/binding-win32-ia32-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
43
|
-
"@oxc-parser/binding-win32-x64-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
44
|
-
"@oxc-project/types","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"retry","https://github.com/tim-kos/node-retry","['MIT']","['Tim Koschützki']"
|
|
92
|
-
"rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
|
|
93
|
-
"semifies","https://github.com/holepunchto/semifies","['Apache-2.0']","['Holepunch Inc']"
|
|
94
|
-
"shell-quote","https://github.com/ljharb/shell-quote","['MIT']","['James Halliday']"
|
|
95
|
-
"source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald']"
|
|
96
|
-
"spark-md5","https://github.com/satazor/js-spark-md5","['(WTFPL OR MIT)']","['André Cruz']"
|
|
97
|
-
"tlhunter-sorted-set","https://github.com/tlhunter/node-sorted-set","['MIT']","['Thomas Hunter II']"
|
|
98
|
-
"tslib","https://github.com/microsoft/tslib","['0BSD']","['Microsoft Corp.']"
|
|
99
|
-
"ttl-set","https://github.com/watson/ttl-set","['MIT']","['Thomas Watson']"
|
|
100
|
-
"undici-types","https://github.com/nodejs/undici","['MIT']","['nodejs']"
|
|
101
|
-
"aws-lambda-nodejs-runtime-interface-client","https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/v2.1.0/src/utils/UserFunction.ts","['Apache-2.0']","['Amazon.com Inc. or its affiliates']"
|
|
102
|
-
"is-git-url","https://github.com/jonschlinkert/is-git-url/blob/396965ffabf2f46656c8af4c47bef1d69f09292e/index.js#L9C15-L9C87","['MIT']","['Jon Schlinkert']"
|
|
1
|
+
"component","origin","license","copyright"
|
|
2
|
+
"@apm-js-collab/code-transformer","https://github.com/nodejs/orchestrion-js","['Apache-2.0']","['nodejs']"
|
|
3
|
+
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
4
|
+
"@datadog/libdatadog","https://github.com/DataDog/libdatadog-nodejs","['Apache-2.0']","['Datadog Inc.']"
|
|
5
|
+
"@datadog/native-appsec","https://github.com/DataDog/dd-native-appsec-js","['Apache-2.0']","['Datadog Inc.']"
|
|
6
|
+
"@datadog/native-iast-taint-tracking","https://github.com/DataDog/dd-native-iast-taint-tracking-js","['Apache-2.0']","['Datadog Inc.']"
|
|
7
|
+
"@datadog/native-metrics","https://github.com/DataDog/dd-native-metrics-js","['Apache-2.0']","['Datadog Inc.']"
|
|
8
|
+
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
9
|
+
"@datadog/pprof","https://github.com/DataDog/pprof-nodejs","['Apache-2.0']","['Google Inc.']"
|
|
10
|
+
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","['DataDog']"
|
|
11
|
+
"@datadog/wasm-js-rewriter","https://github.com/DataDog/dd-wasm-js-rewriter","['Apache-2.0']","['Datadog Inc.']"
|
|
12
|
+
"@emnapi/core","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
|
|
13
|
+
"@emnapi/runtime","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
|
|
14
|
+
"@emnapi/wasi-threads","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
|
|
15
|
+
"@isaacs/ttlcache","https://github.com/isaacs/ttlcache","['BlueOak-1.0.0']","['Isaac Z. Schlueter']"
|
|
16
|
+
"@jsep-plugin/assignment","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
17
|
+
"@jsep-plugin/regex","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
18
|
+
"@napi-rs/wasm-runtime","https://github.com/napi-rs/napi-rs","['MIT']","['LongYinan']"
|
|
19
|
+
"@opentelemetry/api","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
20
|
+
"@opentelemetry/api-logs","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
21
|
+
"@opentelemetry/core","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
22
|
+
"@opentelemetry/resources","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
23
|
+
"@opentelemetry/semantic-conventions","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
24
|
+
"@oxc-parser/binding-android-arm-eabi","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
25
|
+
"@oxc-parser/binding-android-arm64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
26
|
+
"@oxc-parser/binding-darwin-arm64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
27
|
+
"@oxc-parser/binding-darwin-x64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
28
|
+
"@oxc-parser/binding-freebsd-x64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
29
|
+
"@oxc-parser/binding-linux-arm-gnueabihf","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
30
|
+
"@oxc-parser/binding-linux-arm-musleabihf","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
31
|
+
"@oxc-parser/binding-linux-arm64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
32
|
+
"@oxc-parser/binding-linux-arm64-musl","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
33
|
+
"@oxc-parser/binding-linux-ppc64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
34
|
+
"@oxc-parser/binding-linux-riscv64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
35
|
+
"@oxc-parser/binding-linux-riscv64-musl","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
36
|
+
"@oxc-parser/binding-linux-s390x-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
37
|
+
"@oxc-parser/binding-linux-x64-gnu","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
38
|
+
"@oxc-parser/binding-linux-x64-musl","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
39
|
+
"@oxc-parser/binding-openharmony-arm64","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
40
|
+
"@oxc-parser/binding-wasm32-wasi","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
41
|
+
"@oxc-parser/binding-win32-arm64-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
42
|
+
"@oxc-parser/binding-win32-ia32-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
43
|
+
"@oxc-parser/binding-win32-x64-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
44
|
+
"@oxc-project/types","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
45
|
+
"@tybys/wasm-util","https://github.com/toyobayashi/wasm-util","['MIT']","['toyobayashi']"
|
|
46
|
+
"@types/estree","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['DefinitelyTyped']"
|
|
47
|
+
"acorn","https://github.com/acornjs/acorn","['MIT']","['acornjs']"
|
|
48
|
+
"acorn-import-attributes","https://github.com/xtuc/acorn-import-attributes","['MIT']","['Sven Sauleau']"
|
|
49
|
+
"argparse","https://github.com/nodeca/argparse","['Python-2.0']","['nodeca']"
|
|
50
|
+
"astring","https://github.com/davidbonnet/astring","['MIT']","['David Bonnet']"
|
|
51
|
+
"cjs-module-lexer","https://github.com/nodejs/cjs-module-lexer","['MIT']","['Guy Bedford']"
|
|
52
|
+
"crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
|
|
53
|
+
"dc-polyfill","https://github.com/DataDog/dc-polyfill","['MIT']","['Thomas Hunter II']"
|
|
54
|
+
"dd-trace","https://github.com/DataDog/dd-trace-js","['(Apache-2.0 OR BSD-3-Clause)']","['Datadog Inc. <info@datadoghq.com>']"
|
|
55
|
+
"detect-newline","https://github.com/sindresorhus/detect-newline","['MIT']","['Sindre Sorhus']"
|
|
56
|
+
"escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
|
|
57
|
+
"esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
|
|
58
|
+
"estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","['estools']"
|
|
59
|
+
"fast-fifo","https://github.com/mafintosh/fast-fifo","['MIT']","['Mathias Buus']"
|
|
60
|
+
"import-in-the-middle","https://github.com/nodejs/import-in-the-middle","['Apache-2.0']","['Bryan English']"
|
|
61
|
+
"istanbul-lib-coverage","https://github.com/istanbuljs/istanbuljs","['BSD-3-Clause']","['Krishnan Anantheswaran']"
|
|
62
|
+
"jest-docblock","https://github.com/jestjs/jest","['MIT']","['jestjs']"
|
|
63
|
+
"js-yaml","https://github.com/nodeca/js-yaml","['MIT']","['Vladimir Zapparov']"
|
|
64
|
+
"jsep","https://github.com/EricSmekens/jsep","['MIT']","['Stephen Oney']"
|
|
65
|
+
"jsonpath-plus","https://github.com/JSONPath-Plus/JSONPath","['MIT']","['Stefan Goessner']"
|
|
66
|
+
"limiter","https://github.com/jhurliman/node-rate-limiter","['MIT']","['John Hurliman']"
|
|
67
|
+
"lodash.sortby","https://github.com/lodash/lodash","['MIT']","['John-David Dalton']"
|
|
68
|
+
"long","https://github.com/dcodeIO/long.js","['Apache-2.0']","['Daniel Wirtz']"
|
|
69
|
+
"lru-cache","https://github.com/isaacs/node-lru-cache","['ISC']","['Isaac Z. Schlueter']"
|
|
70
|
+
"meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.']"
|
|
71
|
+
"module-details-from-path","https://github.com/watson/module-details-from-path","['MIT']","['Thomas Watson']"
|
|
72
|
+
"mutexify","https://github.com/mafintosh/mutexify","['MIT']","['Mathias Buus']"
|
|
73
|
+
"node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['nodejs']"
|
|
74
|
+
"node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
|
|
75
|
+
"opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","['opentracing']"
|
|
76
|
+
"oxc-parser","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
77
|
+
"pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
|
|
78
|
+
"protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
79
|
+
"queue-tick","https://github.com/mafintosh/queue-tick","['MIT']","['Mathias Buus']"
|
|
80
|
+
"retry","https://github.com/tim-kos/node-retry","['MIT']","['Tim Koschützki']"
|
|
81
|
+
"rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
|
|
82
|
+
"semifies","https://github.com/holepunchto/semifies","['Apache-2.0']","['Holepunch Inc']"
|
|
83
|
+
"shell-quote","https://github.com/ljharb/shell-quote","['MIT']","['James Halliday']"
|
|
84
|
+
"source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald']"
|
|
85
|
+
"spark-md5","https://github.com/satazor/js-spark-md5","['(WTFPL OR MIT)']","['André Cruz']"
|
|
86
|
+
"tlhunter-sorted-set","https://github.com/tlhunter/node-sorted-set","['MIT']","['Thomas Hunter II']"
|
|
87
|
+
"tslib","https://github.com/microsoft/tslib","['0BSD']","['Microsoft Corp.']"
|
|
88
|
+
"ttl-set","https://github.com/watson/ttl-set","['MIT']","['Thomas Watson']"
|
|
89
|
+
"aws-lambda-nodejs-runtime-interface-client","https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/v2.1.0/src/utils/UserFunction.ts","['Apache-2.0']","['Amazon.com Inc. or its affiliates']"
|
|
90
|
+
"is-git-url","https://github.com/jonschlinkert/is-git-url/blob/396965ffabf2f46656c8af4c47bef1d69f09292e/index.js#L9C15-L9C87","['MIT']","['Jon Schlinkert']"
|
package/index.d.ts
CHANGED
|
@@ -230,6 +230,7 @@ interface Plugins {
|
|
|
230
230
|
"apollo": tracer.plugins.apollo;
|
|
231
231
|
"avsc": tracer.plugins.avsc;
|
|
232
232
|
"aws-sdk": tracer.plugins.aws_sdk;
|
|
233
|
+
"azure-cosmos": tracer.plugins.azure_cosmos;
|
|
233
234
|
"azure-event-hubs": tracer.plugins.azure_event_hubs;
|
|
234
235
|
"azure-functions": tracer.plugins.azure_functions;
|
|
235
236
|
"azure-service-bus": tracer.plugins.azure_service_bus;
|
|
@@ -245,6 +246,7 @@ interface Plugins {
|
|
|
245
246
|
"cypress": tracer.plugins.cypress;
|
|
246
247
|
"dns": tracer.plugins.dns;
|
|
247
248
|
"elasticsearch": tracer.plugins.elasticsearch;
|
|
249
|
+
"electron": tracer.plugins.electron;
|
|
248
250
|
"express": tracer.plugins.express;
|
|
249
251
|
"fastify": tracer.plugins.fastify;
|
|
250
252
|
"fetch": tracer.plugins.fetch;
|
|
@@ -278,6 +280,7 @@ interface Plugins {
|
|
|
278
280
|
"mongoose": tracer.plugins.mongoose;
|
|
279
281
|
"mysql": tracer.plugins.mysql;
|
|
280
282
|
"mysql2": tracer.plugins.mysql2;
|
|
283
|
+
"nats": tracer.plugins.nats;
|
|
281
284
|
"net": tracer.plugins.net;
|
|
282
285
|
"next": tracer.plugins.next;
|
|
283
286
|
"nyc": tracer.plugins.nyc;
|
|
@@ -861,6 +864,21 @@ declare namespace tracer {
|
|
|
861
864
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
862
865
|
*/
|
|
863
866
|
initializationTimeoutMs?: number
|
|
867
|
+
/**
|
|
868
|
+
* Configuration for span enrichment with feature flag evaluation data.
|
|
869
|
+
*/
|
|
870
|
+
spanEnrichment?: {
|
|
871
|
+
/**
|
|
872
|
+
* Whether to enable span enrichment with feature flag data.
|
|
873
|
+
* When enabled, feature flag evaluation metadata is attached to APM spans.
|
|
874
|
+
* Can be configured via DD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED environment variable.
|
|
875
|
+
*
|
|
876
|
+
* @default false
|
|
877
|
+
* @env DD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED
|
|
878
|
+
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
879
|
+
*/
|
|
880
|
+
enabled?: boolean
|
|
881
|
+
}
|
|
864
882
|
}
|
|
865
883
|
};
|
|
866
884
|
|
|
@@ -908,11 +926,20 @@ declare namespace tracer {
|
|
|
908
926
|
|
|
909
927
|
/**
|
|
910
928
|
* Enables DBM to APM link using tag injection.
|
|
929
|
+
*
|
|
930
|
+
* - `disabled`: No SQL comment is injected (default).
|
|
931
|
+
* - `service`: Injects a SQL comment with service-level tags (database name, service, environment,
|
|
932
|
+
* host, tracer service, tracer version). Enables DBM–APM correlation without full trace linking.
|
|
933
|
+
* - `full`: Same as `service`, plus a W3C `traceparent` for full distributed trace correlation.
|
|
934
|
+
* - `dynamic_service`: Same as `service`, but also automatically injects the propagation hash
|
|
935
|
+
* (`ddsh`) when process tags are enabled (`DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED=true`).
|
|
936
|
+
* This is a convenience shorthand for `service` + `DD_DBM_INJECT_SQL_BASEHASH=true`.
|
|
937
|
+
*
|
|
911
938
|
* @default 'disabled'
|
|
912
939
|
* @env DD_DBM_PROPAGATION_MODE
|
|
913
940
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
914
941
|
*/
|
|
915
|
-
dbmPropagationMode?: 'disabled' | 'service' | 'full'
|
|
942
|
+
dbmPropagationMode?: 'disabled' | 'service' | 'full' | 'dynamic_service'
|
|
916
943
|
|
|
917
944
|
/**
|
|
918
945
|
* Whether to enable Data Streams Monitoring.
|
|
@@ -1997,6 +2024,20 @@ declare namespace tracer {
|
|
|
1997
2024
|
/** @hidden */
|
|
1998
2025
|
interface Instrumentation extends Integration, Analyzable {}
|
|
1999
2026
|
|
|
2027
|
+
/** @hidden */
|
|
2028
|
+
interface DatabaseInstrumentation extends Instrumentation {
|
|
2029
|
+
/**
|
|
2030
|
+
* Truncate the resource name (e.g. the query) to the given length.
|
|
2031
|
+
* When set to `true`, truncates to 5000 characters (matching the
|
|
2032
|
+
* Datadog agent's default). When set to a number, truncates to that
|
|
2033
|
+
* many characters. This can help prevent large queries from blocking
|
|
2034
|
+
* the event loop during trace encoding.
|
|
2035
|
+
*
|
|
2036
|
+
* @default false
|
|
2037
|
+
*/
|
|
2038
|
+
truncate?: boolean | number;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2000
2041
|
/** @hidden */
|
|
2001
2042
|
interface Http extends Instrumentation {
|
|
2002
2043
|
/**
|
|
@@ -2217,7 +2258,7 @@ declare namespace tracer {
|
|
|
2217
2258
|
}
|
|
2218
2259
|
|
|
2219
2260
|
/** @hidden */
|
|
2220
|
-
interface Prisma extends
|
|
2261
|
+
interface Prisma extends DatabaseInstrumentation {}
|
|
2221
2262
|
|
|
2222
2263
|
/** @hidden */
|
|
2223
2264
|
interface PrismaClient extends Prisma {}
|
|
@@ -2336,6 +2377,12 @@ declare namespace tracer {
|
|
|
2336
2377
|
[key: string]: boolean | Object | undefined;
|
|
2337
2378
|
}
|
|
2338
2379
|
|
|
2380
|
+
/**
|
|
2381
|
+
* This plugin automatically instruments the
|
|
2382
|
+
* @azure/cosmos module
|
|
2383
|
+
*/
|
|
2384
|
+
interface azure_cosmos extends Integration {}
|
|
2385
|
+
|
|
2339
2386
|
/**
|
|
2340
2387
|
* This plugin automatically instruments the
|
|
2341
2388
|
* @azure/event-hubs module
|
|
@@ -2443,6 +2490,26 @@ declare namespace tracer {
|
|
|
2443
2490
|
};
|
|
2444
2491
|
}
|
|
2445
2492
|
|
|
2493
|
+
/**
|
|
2494
|
+
* This plugin automatically instruments the
|
|
2495
|
+
* [electron](https://github.com/electron/electron) module.
|
|
2496
|
+
*/
|
|
2497
|
+
interface electron extends Instrumentation {
|
|
2498
|
+
/**
|
|
2499
|
+
* Whether to enable instrumentation of ipc spans
|
|
2500
|
+
*
|
|
2501
|
+
* @default true
|
|
2502
|
+
*/
|
|
2503
|
+
ipc?: boolean;
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* Whether to enable instrumentation of net spans
|
|
2507
|
+
*
|
|
2508
|
+
* @default true
|
|
2509
|
+
*/
|
|
2510
|
+
net?: boolean;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2446
2513
|
/**
|
|
2447
2514
|
* This plugin automatically instruments the
|
|
2448
2515
|
* [express](http://expressjs.com/) module.
|
|
@@ -2931,6 +2998,13 @@ declare namespace tracer {
|
|
|
2931
2998
|
*/
|
|
2932
2999
|
interface mysql2 extends mysql {}
|
|
2933
3000
|
|
|
3001
|
+
/**
|
|
3002
|
+
* This plugin automatically instruments the
|
|
3003
|
+
* [@nats-io/transport-node](https://github.com/nats-io/nats.js) and
|
|
3004
|
+
* [@nats-io/nats-core](https://github.com/nats-io/nats.js) modules.
|
|
3005
|
+
*/
|
|
3006
|
+
interface nats extends Instrumentation {}
|
|
3007
|
+
|
|
2934
3008
|
/**
|
|
2935
3009
|
* This plugin automatically instruments the
|
|
2936
3010
|
* [net](https://nodejs.org/api/net.html) module.
|
|
@@ -3000,7 +3074,7 @@ declare namespace tracer {
|
|
|
3000
3074
|
* This plugin automatically instruments the
|
|
3001
3075
|
* [pg](https://node-postgres.com/) module.
|
|
3002
3076
|
*/
|
|
3003
|
-
interface pg extends
|
|
3077
|
+
interface pg extends DatabaseInstrumentation {
|
|
3004
3078
|
/**
|
|
3005
3079
|
* The service name to be used for this plugin. If a function is used, it will be passed the connection parameters and its return value will be used as the service name.
|
|
3006
3080
|
*/
|
|
@@ -3745,6 +3819,11 @@ declare namespace tracer {
|
|
|
3745
3819
|
}
|
|
3746
3820
|
|
|
3747
3821
|
interface LLMObservabilitySpan {
|
|
3822
|
+
/**
|
|
3823
|
+
* The span kind
|
|
3824
|
+
*/
|
|
3825
|
+
kind: spanKind,
|
|
3826
|
+
|
|
3748
3827
|
/**
|
|
3749
3828
|
* The input content associated with the span.
|
|
3750
3829
|
*/
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dd-trace",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.106.0",
|
|
4
4
|
"description": "Datadog APM tracing client for JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"env": "bash ./plugin-env",
|
|
9
|
-
"prepare": "cd vendor && npm ci --include=dev",
|
|
9
|
+
"prepare": "node scripts/patch-istanbul-lib-coverage.js && cd vendor && npm ci --include=dev",
|
|
10
10
|
"preinstall": "node scripts/preinstall.js",
|
|
11
11
|
"prepack": "node scripts/release/swap-v5-types.js",
|
|
12
12
|
"bench": "node benchmark/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type:check": "tsc --noEmit -p tsconfig.dev.json",
|
|
20
20
|
"type:doc:build": "cd docs && yarn && yarn build",
|
|
21
21
|
"type:doc:test": "cd docs && yarn && yarn test",
|
|
22
|
-
"lint": "node scripts/check_licenses.js && node scripts/check-no-coverage-artifacts.js && node scripts/check-no-mcr-images.js && node scripts/check-docker-image-shas.js && eslint . --concurrency=auto --max-warnings 0",
|
|
22
|
+
"lint": "node scripts/check_licenses.js && node scripts/check-no-coverage-artifacts.js && node scripts/check-no-mcr-images.js && node scripts/check-docker-image-shas.js && eslint . --concurrency=auto --max-warnings 0 && npm run lint:codeowners:ci && npm run verify-exercised-tests",
|
|
23
23
|
"lint:fix": "node scripts/check_licenses.js && node scripts/check-no-coverage-artifacts.js && node scripts/check-no-mcr-images.js && node scripts/check-docker-image-shas.js && eslint . --concurrency=auto --max-warnings 0 --fix",
|
|
24
24
|
"lint:inspect": "npx @eslint/config-inspector@latest",
|
|
25
25
|
"lint:codeowners": "codeowners-audit",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
},
|
|
130
130
|
"homepage": "https://github.com/DataDog/dd-trace-js#readme",
|
|
131
131
|
"engines": {
|
|
132
|
-
"node": ">=18 <
|
|
132
|
+
"node": ">=18 <27"
|
|
133
133
|
},
|
|
134
134
|
"files": [
|
|
135
135
|
"/package.json",
|
|
@@ -168,14 +168,14 @@
|
|
|
168
168
|
"optionalDependencies": {
|
|
169
169
|
"@datadog/libdatadog": "0.9.3",
|
|
170
170
|
"@datadog/native-appsec": "11.0.1",
|
|
171
|
-
"@datadog/native-iast-taint-tracking": "4.
|
|
171
|
+
"@datadog/native-iast-taint-tracking": "4.2.0",
|
|
172
172
|
"@datadog/native-metrics": "3.1.2",
|
|
173
|
-
"@datadog/openfeature-node-server": "1.1
|
|
174
|
-
"@datadog/pprof": "5.14.
|
|
173
|
+
"@datadog/openfeature-node-server": "1.2.1",
|
|
174
|
+
"@datadog/pprof": "5.14.4",
|
|
175
175
|
"@datadog/wasm-js-rewriter": "5.0.1",
|
|
176
176
|
"@opentelemetry/api": ">=1.0.0 <1.10.0",
|
|
177
177
|
"@opentelemetry/api-logs": "<1.0.0",
|
|
178
|
-
"oxc-parser": "^0.
|
|
178
|
+
"oxc-parser": "^0.132.0"
|
|
179
179
|
},
|
|
180
180
|
"devDependencies": {
|
|
181
181
|
"@actions/core": "^3.0.1",
|
|
@@ -190,16 +190,16 @@
|
|
|
190
190
|
"@types/mocha": "^10.0.10",
|
|
191
191
|
"@types/node": "^18.19.106",
|
|
192
192
|
"@types/sinon": "^21.0.1",
|
|
193
|
-
"axios": "^1.16.
|
|
193
|
+
"axios": "^1.16.1",
|
|
194
194
|
"benchmark": "^2.1.4",
|
|
195
195
|
"body-parser": "^2.2.2",
|
|
196
|
-
"bun": "1.3.
|
|
196
|
+
"bun": "1.3.14",
|
|
197
197
|
"codeowners-audit": "^2.9.0",
|
|
198
198
|
"eslint": "^9.39.2",
|
|
199
199
|
"eslint-plugin-cypress": "^6.4.1",
|
|
200
200
|
"eslint-plugin-import": "^2.32.0",
|
|
201
|
-
"eslint-plugin-jsdoc": "^
|
|
202
|
-
"eslint-plugin-mocha": "^11.
|
|
201
|
+
"eslint-plugin-jsdoc": "^63.0.0",
|
|
202
|
+
"eslint-plugin-mocha": "^11.3.0",
|
|
203
203
|
"eslint-plugin-n": "^18.0.1",
|
|
204
204
|
"eslint-plugin-promise": "^7.3.0",
|
|
205
205
|
"eslint-plugin-sonarjs": "^4.0.3",
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"istanbul-lib-report": "^3.0.0",
|
|
213
213
|
"istanbul-reports": "^3.0.2",
|
|
214
214
|
"jszip": "^3.10.1",
|
|
215
|
-
"mocha": "^11.6
|
|
215
|
+
"mocha": "^11.7.6",
|
|
216
216
|
"mocha-junit-reporter": "^2.2.1",
|
|
217
217
|
"mocha-multi-reporters": "^1.5.1",
|
|
218
218
|
"multer": "^2.1.1",
|
|
@@ -224,12 +224,12 @@
|
|
|
224
224
|
"proxyquire": "^2.1.3",
|
|
225
225
|
"retry": "^0.13.1",
|
|
226
226
|
"semifies": "^1.0.0",
|
|
227
|
-
"semver": "^7.
|
|
227
|
+
"semver": "^7.8.1",
|
|
228
228
|
"sinon": "^22.0.0",
|
|
229
229
|
"tiktoken": "^1.0.21",
|
|
230
230
|
"typescript": "^6.0.3",
|
|
231
231
|
"workerpool": "^10.0.2",
|
|
232
|
-
"yaml": "^2.
|
|
232
|
+
"yaml": "^2.9.0",
|
|
233
233
|
"yarn-deduplicate": "^6.0.2"
|
|
234
234
|
}
|
|
235
235
|
}
|
|
@@ -13,12 +13,12 @@ const tracers = new WeakSet()
|
|
|
13
13
|
const wrappedModels = new WeakSet()
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Publishes already-converted AI
|
|
16
|
+
* Publishes already-converted AI-style messages to the AI Guard evaluation channel.
|
|
17
17
|
*
|
|
18
|
-
* @param {Array<object>} messages - AI
|
|
18
|
+
* @param {Array<object>} messages - AI-style messages to evaluate.
|
|
19
19
|
* @returns {Promise<void>}
|
|
20
20
|
*/
|
|
21
|
-
function
|
|
21
|
+
function publishEvaluation (messages) {
|
|
22
22
|
return new Promise((resolve, reject) => {
|
|
23
23
|
aiguardChannel.publish({ messages, integration: 'ai', resolve, reject })
|
|
24
24
|
})
|
|
@@ -47,10 +47,11 @@ function wrapModelWithAIGuard (model) {
|
|
|
47
47
|
|
|
48
48
|
// Run AI Guard input evaluation and LLM call in parallel.
|
|
49
49
|
// The LLM has no side effects so it is safe to discard its result if AI Guard blocks.
|
|
50
|
-
return Promise.all([
|
|
50
|
+
return Promise.all([publishEvaluation(inputMessages), originalResult])
|
|
51
51
|
.then(([, result]) => {
|
|
52
52
|
if (!result.content?.length) return result
|
|
53
|
-
|
|
53
|
+
const outputMessages = buildOutputMessages(inputMessages, result.content)
|
|
54
|
+
return publishEvaluation(outputMessages)
|
|
54
55
|
.then(() => result)
|
|
55
56
|
})
|
|
56
57
|
}
|
|
@@ -70,7 +71,7 @@ function wrapModelWithAIGuard (model) {
|
|
|
70
71
|
|
|
71
72
|
// Run AI Guard input evaluation and LLM call in parallel.
|
|
72
73
|
// The LLM has no side effects so it is safe to discard its result if AI Guard blocks.
|
|
73
|
-
return Promise.all([
|
|
74
|
+
return Promise.all([publishEvaluation(inputMessages), originalResult])
|
|
74
75
|
.then(([, result]) => {
|
|
75
76
|
const chunks = []
|
|
76
77
|
const reader = result.stream.getReader()
|
|
@@ -89,7 +90,7 @@ function wrapModelWithAIGuard (model) {
|
|
|
89
90
|
const content = toolCalls.length ? toolCalls : text ? [{ type: 'text', text }] : []
|
|
90
91
|
|
|
91
92
|
const evaluate = content.length
|
|
92
|
-
?
|
|
93
|
+
? publishEvaluation(buildOutputMessages(inputMessages, content))
|
|
93
94
|
: Promise.resolve()
|
|
94
95
|
|
|
95
96
|
return evaluate.then(() => {
|
|
@@ -233,13 +233,14 @@ function wrapSmithySend (send) {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
function handleCompletion (result, ctx, channels) {
|
|
236
|
-
const
|
|
236
|
+
const streamable = result?.body ?? result?.stream
|
|
237
|
+
const iterator = streamable?.[Symbol.asyncIterator]
|
|
237
238
|
if (!iterator) {
|
|
238
239
|
channels.complete.publish(ctx)
|
|
239
240
|
return
|
|
240
241
|
}
|
|
241
242
|
|
|
242
|
-
shimmer.wrap(
|
|
243
|
+
shimmer.wrap(streamable, Symbol.asyncIterator, function (asyncIterator) {
|
|
243
244
|
return function (...args) {
|
|
244
245
|
const iterator = asyncIterator.apply(this, args)
|
|
245
246
|
shimmer.wrap(iterator, 'next', function (next) {
|
|
@@ -324,6 +325,19 @@ addHook({ name: '@aws-sdk/smithy-client', versions: ['>=3'] }, smithy => {
|
|
|
324
325
|
return smithy
|
|
325
326
|
})
|
|
326
327
|
|
|
328
|
+
// `@aws-sdk/client-*` >= 3.1046.0 dropped `@smithy/smithy-client` and now
|
|
329
|
+
// extends from `@smithy/core/client` directly. The `Client.send` contract is
|
|
330
|
+
// unchanged, but the host module moved -- patch the new home so the v3 hooks
|
|
331
|
+
// keep firing.
|
|
332
|
+
addHook({
|
|
333
|
+
name: '@smithy/core',
|
|
334
|
+
file: 'dist-cjs/submodules/client/index.js',
|
|
335
|
+
versions: ['>=3.24.0'],
|
|
336
|
+
}, smithyCoreClient => {
|
|
337
|
+
shimmer.wrap(smithyCoreClient.Client.prototype, 'send', wrapSmithySend)
|
|
338
|
+
return smithyCoreClient
|
|
339
|
+
})
|
|
340
|
+
|
|
327
341
|
addHook({ name: 'aws-sdk', versions: ['>=2.3.0'] }, AWS => {
|
|
328
342
|
shimmer.wrap(AWS.config, 'setPromisesDependency', setPromisesDependency => {
|
|
329
343
|
return function wrappedSetPromisesDependency (dep) {
|
|
@@ -26,6 +26,9 @@ addHook({ name: '@azure/functions', versions: ['>=4'], patchDefault: false }, (a
|
|
|
26
26
|
// Event Hub triggers
|
|
27
27
|
shimmer.wrap(app, 'eventHub', wrapHandler)
|
|
28
28
|
|
|
29
|
+
// CosmosDB triggers
|
|
30
|
+
shimmer.wrap(app, 'cosmosDB', wrapHandler)
|
|
31
|
+
|
|
29
32
|
return azureFunction
|
|
30
33
|
})
|
|
31
34
|
|