dd-trace 5.80.0 → 5.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +79 -88
- package/ext/tags.d.ts +1 -0
- package/ext/tags.js +1 -0
- package/index.d.ts +35 -35
- package/loader-hook.mjs +10 -3
- package/package.json +22 -40
- package/packages/datadog-esbuild/index.js +36 -19
- package/packages/datadog-instrumentations/index.js +1 -0
- package/packages/datadog-instrumentations/src/anthropic.js +12 -0
- package/packages/datadog-instrumentations/src/aws-sdk.js +5 -1
- package/packages/datadog-instrumentations/src/cucumber.js +2 -2
- package/packages/datadog-instrumentations/src/find-my-way.js +6 -5
- package/packages/datadog-instrumentations/src/google-genai.js +120 -0
- package/packages/datadog-instrumentations/src/graphql.js +20 -0
- package/packages/datadog-instrumentations/src/helpers/hooks.js +1 -0
- package/packages/datadog-instrumentations/src/helpers/instrument.js +10 -0
- package/packages/datadog-instrumentations/src/helpers/register.js +6 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +27 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +152 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +5 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langchain.js +237 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.js +9 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.mjs +11 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +139 -0
- package/packages/datadog-instrumentations/src/langchain.js +3 -109
- package/packages/datadog-instrumentations/src/mocha/main.js +1 -1
- package/packages/datadog-instrumentations/src/mysql2.js +1 -1
- package/packages/datadog-instrumentations/src/playwright.js +45 -16
- package/packages/datadog-instrumentations/src/router.js +1 -1
- package/packages/datadog-instrumentations/src/selenium.js +3 -1
- package/packages/datadog-instrumentations/src/ws.js +35 -17
- package/packages/datadog-plugin-child_process/src/scrub-cmd-params.js +1 -1
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +23 -2
- package/packages/datadog-plugin-cypress/src/plugin.js +1 -1
- package/packages/datadog-plugin-cypress/src/support.js +73 -31
- package/packages/datadog-plugin-google-genai/src/index.js +17 -0
- package/packages/datadog-plugin-google-genai/src/tracing.js +41 -0
- package/packages/datadog-plugin-graphql/src/tools/transforms.js +5 -4
- package/packages/datadog-plugin-jest/src/util.js +1 -1
- package/packages/datadog-plugin-langchain/src/tracing.js +7 -3
- package/packages/datadog-plugin-next/src/index.js +11 -3
- package/packages/dd-trace/src/aiguard/sdk.js +18 -10
- package/packages/dd-trace/src/appsec/api_security_sampler.js +1 -1
- package/packages/dd-trace/src/appsec/iast/overhead-controller.js +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +1 -2
- package/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +1 -1
- package/packages/dd-trace/src/appsec/reporter.js +0 -4
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +4 -8
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +4 -2
- package/packages/dd-trace/src/config.js +81 -7
- package/packages/dd-trace/src/config_defaults.js +14 -2
- package/packages/dd-trace/src/datastreams/encoding.js +23 -6
- package/packages/dd-trace/src/datastreams/pathway.js +40 -1
- package/packages/dd-trace/src/datastreams/processor.js +1 -1
- package/packages/dd-trace/src/datastreams/schemas/schema_builder.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +15 -5
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/config.js +2 -0
- package/packages/dd-trace/src/debugger/devtools_client/index.js +30 -15
- package/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js +2 -0
- package/packages/dd-trace/src/debugger/devtools_client/json-buffer.js +24 -18
- package/packages/dd-trace/src/debugger/devtools_client/send.js +18 -8
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/collector.js +103 -15
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/constants.js +25 -0
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/index.js +56 -25
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/processor.js +64 -23
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js +3 -1
- package/packages/dd-trace/src/debugger/devtools_client/snapshot-pruner.js +404 -0
- package/packages/dd-trace/src/debugger/devtools_client/source-maps.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/state.js +7 -2
- package/packages/dd-trace/src/debugger/devtools_client/status.js +1 -1
- package/packages/dd-trace/src/debugger/index.js +1 -1
- package/packages/dd-trace/src/encode/span-stats.js +7 -1
- package/packages/dd-trace/src/histogram.js +1 -1
- package/packages/dd-trace/src/id.js +60 -0
- package/packages/dd-trace/src/lambda/runtime/ritm.js +1 -1
- package/packages/dd-trace/src/llmobs/constants/tags.js +1 -0
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +104 -0
- package/packages/dd-trace/src/llmobs/plugins/genai/util.js +486 -0
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +2 -2
- package/packages/dd-trace/src/llmobs/plugins/{openai.js → openai/index.js} +48 -6
- package/packages/dd-trace/src/llmobs/plugins/openai/utils.js +114 -0
- package/packages/dd-trace/src/llmobs/sdk.js +5 -0
- package/packages/dd-trace/src/llmobs/span_processor.js +6 -1
- package/packages/dd-trace/src/llmobs/tagger.js +4 -0
- package/packages/dd-trace/src/opentelemetry/logs/index.js +2 -2
- package/packages/dd-trace/src/opentelemetry/logs/logger.js +3 -2
- package/packages/dd-trace/src/opentelemetry/logs/otlp_http_log_exporter.js +5 -3
- package/packages/dd-trace/src/opentelemetry/logs/otlp_transformer.js +8 -8
- package/packages/dd-trace/src/opentelemetry/metrics/constants.js +34 -0
- package/packages/dd-trace/src/opentelemetry/metrics/index.js +81 -0
- package/packages/dd-trace/src/opentelemetry/metrics/instruments.js +225 -0
- package/packages/dd-trace/src/opentelemetry/metrics/meter.js +171 -0
- package/packages/dd-trace/src/opentelemetry/metrics/meter_provider.js +54 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_http_metric_exporter.js +62 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_transformer.js +251 -0
- package/packages/dd-trace/src/opentelemetry/metrics/periodic_metric_reader.js +532 -0
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +10 -18
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_transformer_base.js +36 -22
- package/packages/dd-trace/src/opentelemetry/otlp/protobuf_loader.js +1 -1
- package/packages/dd-trace/src/opentelemetry/span.js +1 -1
- package/packages/dd-trace/src/opentelemetry/tracer.js +1 -1
- package/packages/dd-trace/src/opentelemetry/tracer_provider.js +1 -1
- package/packages/dd-trace/src/payload-tagging/index.js +2 -2
- package/packages/dd-trace/src/plugin_manager.js +4 -2
- package/packages/dd-trace/src/plugins/index.js +1 -0
- package/packages/dd-trace/src/plugins/util/test.js +3 -3
- package/packages/dd-trace/src/plugins/util/url.js +119 -1
- package/packages/dd-trace/src/plugins/util/web.js +10 -41
- package/packages/dd-trace/src/process-tags/index.js +81 -0
- package/packages/dd-trace/src/profiling/config.js +1 -1
- package/packages/dd-trace/src/profiling/exporters/agent.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/events.js +10 -1
- package/packages/dd-trace/src/proxy.js +5 -0
- package/packages/dd-trace/src/rate_limiter.js +1 -1
- package/packages/dd-trace/src/remote_config/manager.js +1 -1
- package/packages/dd-trace/src/ritm.js +1 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/web.js +4 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/web.js +4 -0
- package/packages/dd-trace/src/span_format.js +9 -4
- package/packages/dd-trace/src/span_processor.js +8 -3
- package/packages/dd-trace/src/span_stats.js +15 -4
- package/packages/dd-trace/src/spanleak.js +1 -1
- package/packages/dd-trace/src/supported-configurations.json +13 -0
- package/packages/dd-trace/src/telemetry/dependencies.js +1 -1
- package/packages/dd-trace/src/telemetry/telemetry.js +11 -2
- package/vendor/dist/@datadog/sketches-js/LICENSE +39 -0
- package/vendor/dist/@datadog/sketches-js/index.js +1 -0
- package/vendor/dist/@datadog/source-map/LICENSE +28 -0
- package/vendor/dist/@datadog/source-map/index.js +1 -0
- package/vendor/dist/@isaacs/ttlcache/LICENSE +55 -0
- package/vendor/dist/@isaacs/ttlcache/index.js +1 -0
- package/vendor/dist/@opentelemetry/core/LICENSE +201 -0
- package/vendor/dist/@opentelemetry/core/index.js +1 -0
- package/vendor/dist/@opentelemetry/resources/LICENSE +201 -0
- package/vendor/dist/@opentelemetry/resources/index.js +1 -0
- package/vendor/dist/astring/LICENSE +19 -0
- package/vendor/dist/astring/index.js +1 -0
- package/vendor/dist/crypto-randomuuid/index.js +1 -0
- package/vendor/dist/escape-string-regexp/LICENSE +9 -0
- package/vendor/dist/escape-string-regexp/index.js +1 -0
- package/vendor/dist/esquery/LICENSE +24 -0
- package/vendor/dist/esquery/index.js +1 -0
- package/vendor/dist/ignore/LICENSE +21 -0
- package/vendor/dist/ignore/index.js +1 -0
- package/vendor/dist/istanbul-lib-coverage/LICENSE +24 -0
- package/vendor/dist/istanbul-lib-coverage/index.js +1 -0
- package/vendor/dist/jest-docblock/LICENSE +21 -0
- package/vendor/dist/jest-docblock/index.js +1 -0
- package/vendor/dist/jsonpath-plus/LICENSE +22 -0
- package/vendor/dist/jsonpath-plus/index.js +1 -0
- package/vendor/dist/limiter/LICENSE +19 -0
- package/vendor/dist/limiter/index.js +1 -0
- package/vendor/dist/lodash.sortby/LICENSE +47 -0
- package/vendor/dist/lodash.sortby/index.js +1 -0
- package/vendor/dist/lru-cache/LICENSE +15 -0
- package/vendor/dist/lru-cache/index.js +1 -0
- package/vendor/dist/meriyah/LICENSE +7 -0
- package/vendor/dist/meriyah/index.js +1 -0
- package/vendor/dist/module-details-from-path/LICENSE +21 -0
- package/vendor/dist/module-details-from-path/index.js +1 -0
- package/vendor/dist/mutexify/promise/LICENSE +21 -0
- package/vendor/dist/mutexify/promise/index.js +1 -0
- package/vendor/dist/opentracing/LICENSE +201 -0
- package/vendor/dist/opentracing/binary_carrier.d.ts +11 -0
- package/vendor/dist/opentracing/constants.d.ts +61 -0
- package/vendor/dist/opentracing/examples/demo/demo.d.ts +2 -0
- package/vendor/dist/opentracing/ext/tags.d.ts +90 -0
- package/vendor/dist/opentracing/functions.d.ts +20 -0
- package/vendor/dist/opentracing/global_tracer.d.ts +14 -0
- package/vendor/dist/opentracing/index.d.ts +12 -0
- package/vendor/dist/opentracing/index.js +1 -0
- package/vendor/dist/opentracing/mock_tracer/index.d.ts +5 -0
- package/vendor/dist/opentracing/mock_tracer/mock_context.d.ts +13 -0
- package/vendor/dist/opentracing/mock_tracer/mock_report.d.ts +16 -0
- package/vendor/dist/opentracing/mock_tracer/mock_span.d.ts +50 -0
- package/vendor/dist/opentracing/mock_tracer/mock_tracer.d.ts +26 -0
- package/vendor/dist/opentracing/noop.d.ts +8 -0
- package/vendor/dist/opentracing/reference.d.ts +33 -0
- package/vendor/dist/opentracing/span.d.ts +147 -0
- package/vendor/dist/opentracing/span_context.d.ts +26 -0
- package/vendor/dist/opentracing/test/api_compatibility.d.ts +16 -0
- package/vendor/dist/opentracing/test/mocktracer_implemenation.d.ts +3 -0
- package/vendor/dist/opentracing/test/noop_implementation.d.ts +4 -0
- package/vendor/dist/opentracing/test/opentracing_api.d.ts +3 -0
- package/vendor/dist/opentracing/test/unittest.d.ts +2 -0
- package/vendor/dist/opentracing/tracer.d.ts +127 -0
- package/vendor/dist/path-to-regexp/LICENSE +21 -0
- package/vendor/dist/path-to-regexp/index.js +1 -0
- package/vendor/dist/pprof-format/LICENSE +8 -0
- package/vendor/dist/pprof-format/index.js +1 -0
- package/vendor/dist/protobufjs/LICENSE +39 -0
- package/vendor/dist/protobufjs/index.js +1 -0
- package/vendor/dist/protobufjs/minimal/LICENSE +39 -0
- package/vendor/dist/protobufjs/minimal/index.js +1 -0
- package/vendor/dist/retry/LICENSE +21 -0
- package/vendor/dist/retry/index.js +1 -0
- package/vendor/dist/rfdc/LICENSE +15 -0
- package/vendor/dist/rfdc/index.js +1 -0
- package/vendor/dist/semifies/LICENSE +201 -0
- package/vendor/dist/semifies/index.js +1 -0
- package/vendor/dist/shell-quote/LICENSE +24 -0
- package/vendor/dist/shell-quote/index.js +1 -0
- package/vendor/dist/source-map/LICENSE +28 -0
- package/vendor/dist/source-map/index.js +1 -0
- package/vendor/dist/source-map/lib/util/LICENSE +28 -0
- package/vendor/dist/source-map/lib/util/index.js +1 -0
- package/vendor/dist/source-map/mappings.wasm +0 -0
- package/vendor/dist/tlhunter-sorted-set/LICENSE +21 -0
- package/vendor/dist/tlhunter-sorted-set/index.js +1 -0
- package/vendor/dist/ttl-set/LICENSE +21 -0
- package/vendor/dist/ttl-set/index.js +1 -0
package/LICENSE-3rdparty.csv
CHANGED
|
@@ -1,88 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
dev,tap,ISC,Copyright 2011-2022 Isaac Z. Schlueter and Contributors
|
|
81
|
-
dev,tiktoken,MIT,Copyright (c) 2022 OpenAI, Shantanu Jain
|
|
82
|
-
dev,typescript,Apache license 2.0,Copyright Microsoft Corp.
|
|
83
|
-
dev,workerpool,Apache license 2.0,Copyright (C) 2014-2024 Jos de Jong wjosdejong@gmail.com
|
|
84
|
-
dev,yaml,ISC,Copyright Eemeli Aro <eemeli@gmail.com>
|
|
85
|
-
dev,yarn-deduplicate,Apache license 2.0,Copyright [yyyy] [name of copyright owner]
|
|
86
|
-
file,aws-lambda-nodejs-runtime-interface-client,Apache 2.0,Copyright 2019 Amazon.com Inc. or its affiliates. All Rights Reserved.
|
|
87
|
-
file,profile.proto,Apache license 2.0,Copyright 2016 Google Inc.
|
|
88
|
-
file,is-git-url,MIT,Copyright (c) 2017 Jon Schlinkert.
|
|
1
|
+
"component","origin","license","copyright"
|
|
2
|
+
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
3
|
+
"@datadog/libdatadog","https://github.com/DataDog/libdatadog-nodejs","['Apache-2.0']","['Datadog Inc.']"
|
|
4
|
+
"@datadog/native-appsec","https://github.com/DataDog/dd-native-appsec-js","['Apache-2.0']","['Datadog Inc.']"
|
|
5
|
+
"@datadog/native-iast-taint-tracking","https://github.com/DataDog/dd-native-iast-taint-tracking-js","['Apache-2.0']","['Datadog Inc.']"
|
|
6
|
+
"@datadog/native-metrics","https://github.com/DataDog/dd-native-metrics-js","['Apache-2.0']","['Datadog Inc.']"
|
|
7
|
+
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
8
|
+
"@datadog/pprof","https://github.com/DataDog/pprof-nodejs","['Apache-2.0']","['Google Inc.']"
|
|
9
|
+
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","['DataDog']"
|
|
10
|
+
"@datadog/source-map","npm:@datadog/source-map","[]","[]"
|
|
11
|
+
"@datadog/wasm-js-rewriter","https://github.com/DataDog/dd-wasm-js-rewriter","['Apache-2.0']","['Datadog Inc.']"
|
|
12
|
+
"@isaacs/ttlcache","https://github.com/isaacs/ttlcache","['BlueOak-1.0.0']","['Isaac Z. Schlueter']"
|
|
13
|
+
"@jsep-plugin/assignment","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
14
|
+
"@jsep-plugin/regex","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
15
|
+
"@openfeature/server-sdk","https://github.com/open-feature/js-sdk","['Apache-2.0']","['open-feature']"
|
|
16
|
+
"@opentelemetry/api","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
17
|
+
"@opentelemetry/api-logs","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
18
|
+
"@opentelemetry/core","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
19
|
+
"@opentelemetry/resources","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
20
|
+
"@opentelemetry/semantic-conventions","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
21
|
+
"@protobufjs/aspromise","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
22
|
+
"@protobufjs/base64","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
23
|
+
"@protobufjs/codegen","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
24
|
+
"@protobufjs/eventemitter","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
25
|
+
"@protobufjs/fetch","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
26
|
+
"@protobufjs/float","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
27
|
+
"@protobufjs/inquire","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
28
|
+
"@protobufjs/path","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
29
|
+
"@protobufjs/pool","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
30
|
+
"@protobufjs/utf8","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
31
|
+
"@types/node","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['DefinitelyTyped']"
|
|
32
|
+
"acorn","https://github.com/acornjs/acorn","['MIT']","['acornjs']"
|
|
33
|
+
"acorn-import-attributes","https://github.com/xtuc/acorn-import-attributes","['MIT']","['Sven Sauleau']"
|
|
34
|
+
"argparse","https://github.com/nodeca/argparse","['Python-2.0']","['nodeca']"
|
|
35
|
+
"astring","https://github.com/davidbonnet/astring","['MIT']","['David Bonnet']"
|
|
36
|
+
"cjs-module-lexer","https://github.com/nodejs/cjs-module-lexer","['MIT']","['Guy Bedford']"
|
|
37
|
+
"crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
|
|
38
|
+
"dc-polyfill","https://github.com/DataDog/dc-polyfill","['MIT']","['Thomas Hunter II']"
|
|
39
|
+
"dd-trace","https://github.com/DataDog/dd-trace-js","['(Apache-2.0 OR BSD-3-Clause)']","['Datadog Inc. <info@datadoghq.com>']"
|
|
40
|
+
"delay","https://github.com/sindresorhus/delay","['MIT']","['Sindre Sorhus']"
|
|
41
|
+
"detect-newline","https://github.com/sindresorhus/detect-newline","['MIT']","['Sindre Sorhus']"
|
|
42
|
+
"escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
|
|
43
|
+
"esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
|
|
44
|
+
"estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","['estools']"
|
|
45
|
+
"fast-fifo","https://github.com/mafintosh/fast-fifo","['MIT']","['Mathias Buus']"
|
|
46
|
+
"ignore","https://github.com/kaelzhang/node-ignore","['MIT']","['kael']"
|
|
47
|
+
"import-in-the-middle","https://github.com/nodejs/import-in-the-middle","['Apache-2.0']","['Bryan English']"
|
|
48
|
+
"istanbul-lib-coverage","https://github.com/istanbuljs/istanbuljs","['BSD-3-Clause']","['Krishnan Anantheswaran']"
|
|
49
|
+
"jest-docblock","https://github.com/jestjs/jest","['MIT']","['jestjs']"
|
|
50
|
+
"js-yaml","https://github.com/nodeca/js-yaml","['MIT']","['Vladimir Zapparov']"
|
|
51
|
+
"jsep","https://github.com/EricSmekens/jsep","['MIT']","['Stephen Oney']"
|
|
52
|
+
"jsonpath-plus","https://github.com/JSONPath-Plus/JSONPath","['MIT']","['Stefan Goessner']"
|
|
53
|
+
"limiter","https://github.com/jhurliman/node-rate-limiter","['MIT']","['John Hurliman']"
|
|
54
|
+
"lodash.sortby","https://github.com/lodash/lodash","['MIT']","['John-David Dalton']"
|
|
55
|
+
"long","https://github.com/dcodeIO/long.js","['Apache-2.0']","['Daniel Wirtz']"
|
|
56
|
+
"lru-cache","https://github.com/isaacs/node-lru-cache","['ISC']","['Isaac Z. Schlueter']"
|
|
57
|
+
"meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.']"
|
|
58
|
+
"module-details-from-path","https://github.com/watson/module-details-from-path","['MIT']","['Thomas Watson']"
|
|
59
|
+
"mutexify","https://github.com/mafintosh/mutexify","['MIT']","['Mathias Buus']"
|
|
60
|
+
"node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['nodejs']"
|
|
61
|
+
"node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
|
|
62
|
+
"opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","['opentracing']"
|
|
63
|
+
"p-limit","https://github.com/sindresorhus/p-limit","['MIT']","['Sindre Sorhus']"
|
|
64
|
+
"path-to-regexp","https://github.com/pillarjs/path-to-regexp","['MIT']","['pillarjs']"
|
|
65
|
+
"pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
|
|
66
|
+
"protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
67
|
+
"queue-tick","https://github.com/mafintosh/queue-tick","['MIT']","['Mathias Buus']"
|
|
68
|
+
"retry","https://github.com/tim-kos/node-retry","['MIT']","['Tim Koschützki']"
|
|
69
|
+
"rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
|
|
70
|
+
"semifies","https://github.com/holepunchto/semifies","['Apache-2.0']","['Holepunch Inc']"
|
|
71
|
+
"shell-quote","https://github.com/ljharb/shell-quote","['MIT']","['James Halliday']"
|
|
72
|
+
"source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald']"
|
|
73
|
+
"spark-md5","https://github.com/satazor/js-spark-md5","['(WTFPL OR MIT)']","['André Cruz']"
|
|
74
|
+
"tlhunter-sorted-set","https://github.com/tlhunter/node-sorted-set","['MIT']","['Thomas Hunter II']"
|
|
75
|
+
"ttl-set","https://github.com/watson/ttl-set","['MIT']","['Thomas Watson']"
|
|
76
|
+
"undici-types","https://github.com/nodejs/undici","['MIT']","['nodejs']"
|
|
77
|
+
"yocto-queue","https://github.com/sindresorhus/yocto-queue","['MIT']","['Sindre Sorhus']"
|
|
78
|
+
"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']"
|
|
79
|
+
"is-git-url","https://github.com/jonschlinkert/is-git-url/blob/396965ffabf2f46656c8af4c47bef1d69f09292e/index.js#L9C15-L9C87","['MIT']","['Jon Schlinkert']"
|
package/ext/tags.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare const tags: {
|
|
|
15
15
|
HTTP_METHOD: 'http.method'
|
|
16
16
|
HTTP_STATUS_CODE: 'http.status_code'
|
|
17
17
|
HTTP_ROUTE: 'http.route'
|
|
18
|
+
HTTP_ENDPOINT: 'http.endpoint'
|
|
18
19
|
HTTP_REQUEST_HEADERS: 'http.request.headers'
|
|
19
20
|
HTTP_RESPONSE_HEADERS: 'http.response.headers'
|
|
20
21
|
HTTP_USERAGENT: 'http.useragent',
|
package/ext/tags.js
CHANGED
|
@@ -20,6 +20,7 @@ const tags = {
|
|
|
20
20
|
HTTP_METHOD: 'http.method',
|
|
21
21
|
HTTP_STATUS_CODE: 'http.status_code',
|
|
22
22
|
HTTP_ROUTE: 'http.route',
|
|
23
|
+
HTTP_ENDPOINT: 'http.endpoint',
|
|
23
24
|
HTTP_REQUEST_HEADERS: 'http.request.headers',
|
|
24
25
|
HTTP_RESPONSE_HEADERS: 'http.response.headers',
|
|
25
26
|
HTTP_USERAGENT: 'http.useragent',
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientRequest, IncomingMessage, OutgoingMessage, ServerResponse } from "http";
|
|
2
2
|
import { LookupFunction } from 'net';
|
|
3
|
-
import * as opentracing from "opentracing";
|
|
3
|
+
import * as opentracing from "./vendor/dist/opentracing";
|
|
4
4
|
import * as otel from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -207,6 +207,7 @@ interface Plugins {
|
|
|
207
207
|
"generic-pool": tracer.plugins.generic_pool;
|
|
208
208
|
"google-cloud-pubsub": tracer.plugins.google_cloud_pubsub;
|
|
209
209
|
"google-cloud-vertexai": tracer.plugins.google_cloud_vertexai;
|
|
210
|
+
"google-genai": tracer.plugins.google_genai;
|
|
210
211
|
"graphql": tracer.plugins.graphql;
|
|
211
212
|
"grpc": tracer.plugins.grpc;
|
|
212
213
|
"hapi": tracer.plugins.hapi;
|
|
@@ -541,6 +542,12 @@ declare namespace tracer {
|
|
|
541
542
|
eventLoop?: boolean
|
|
542
543
|
}
|
|
543
544
|
|
|
545
|
+
/**
|
|
546
|
+
* Whether to add an auto-generated `runtime-id` tag to metrics.
|
|
547
|
+
* @default false
|
|
548
|
+
*/
|
|
549
|
+
runtimeMetricsRuntimeId?: boolean
|
|
550
|
+
|
|
544
551
|
/**
|
|
545
552
|
* Custom function for DNS lookups when sending requests to the agent.
|
|
546
553
|
* @default dns.lookup()
|
|
@@ -577,13 +584,6 @@ declare namespace tracer {
|
|
|
577
584
|
*/
|
|
578
585
|
experimental?: {
|
|
579
586
|
b3?: boolean
|
|
580
|
-
traceparent?: boolean
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Whether to add an auto-generated `runtime-id` tag to metrics.
|
|
584
|
-
* @default false
|
|
585
|
-
*/
|
|
586
|
-
runtimeId?: boolean
|
|
587
587
|
|
|
588
588
|
/**
|
|
589
589
|
* Whether to write traces to log output or agentless, rather than send to an agent
|
|
@@ -687,13 +687,6 @@ declare namespace tracer {
|
|
|
687
687
|
*/
|
|
688
688
|
tags?: { [key: string]: any };
|
|
689
689
|
|
|
690
|
-
/**
|
|
691
|
-
* Specifies which scope implementation to use. The default is to use the best
|
|
692
|
-
* implementation for the runtime. Only change this if you know what you are
|
|
693
|
-
* doing.
|
|
694
|
-
*/
|
|
695
|
-
scope?: 'async_hooks' | 'async_local_storage' | 'async_resource' | 'sync' | 'noop'
|
|
696
|
-
|
|
697
690
|
/**
|
|
698
691
|
* Whether to report the hostname of the service host. This is used when the agent is deployed on a different host and cannot determine the hostname automatically.
|
|
699
692
|
* @default false
|
|
@@ -706,13 +699,6 @@ declare namespace tracer {
|
|
|
706
699
|
*/
|
|
707
700
|
logLevel?: 'error' | 'debug'
|
|
708
701
|
|
|
709
|
-
/**
|
|
710
|
-
* If false, require a parent in order to trace.
|
|
711
|
-
* @default true
|
|
712
|
-
* @deprecated since version 4.0
|
|
713
|
-
*/
|
|
714
|
-
orphanable?: boolean
|
|
715
|
-
|
|
716
702
|
/**
|
|
717
703
|
* Enables DBM to APM link using tag injection.
|
|
718
704
|
* @default 'disabled'
|
|
@@ -919,7 +905,7 @@ declare namespace tracer {
|
|
|
919
905
|
/**
|
|
920
906
|
* The selection and priority order of context propagation injection and extraction mechanisms.
|
|
921
907
|
*/
|
|
922
|
-
|
|
908
|
+
tracePropagationStyle?: string[] | PropagationStyle
|
|
923
909
|
|
|
924
910
|
/**
|
|
925
911
|
* Cloud payload report as tags
|
|
@@ -1334,6 +1320,10 @@ declare namespace tracer {
|
|
|
1334
1320
|
* Human-readable explanation for why this action was chosen.
|
|
1335
1321
|
*/
|
|
1336
1322
|
reason: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* List of tags associated with the evaluation (e.g. indirect-prompt-injection)
|
|
1325
|
+
*/
|
|
1326
|
+
tags: string[];
|
|
1337
1327
|
}
|
|
1338
1328
|
|
|
1339
1329
|
/**
|
|
@@ -1345,6 +1335,10 @@ declare namespace tracer {
|
|
|
1345
1335
|
* Human-readable explanation from AI Guard describing why the conversation was blocked.
|
|
1346
1336
|
*/
|
|
1347
1337
|
reason: string;
|
|
1338
|
+
/**
|
|
1339
|
+
* List of tags associated with the evaluation (e.g. indirect-prompt-injection)
|
|
1340
|
+
*/
|
|
1341
|
+
tags: string[];
|
|
1348
1342
|
}
|
|
1349
1343
|
|
|
1350
1344
|
/**
|
|
@@ -1862,19 +1856,25 @@ declare namespace tracer {
|
|
|
1862
1856
|
/**
|
|
1863
1857
|
* This plugin automatically instruments the
|
|
1864
1858
|
* [@google-cloud/vertexai](https://github.com/googleapis/nodejs-vertexai) module.
|
|
1865
|
-
|
|
1866
|
-
|
|
1859
|
+
*/
|
|
1860
|
+
interface google_cloud_vertexai extends Integration {}
|
|
1867
1861
|
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1862
|
+
/**
|
|
1863
|
+
* This plugin automatically instruments the
|
|
1864
|
+
* [@google-genai](https://github.com/googleapis/js-genai) module.
|
|
1865
|
+
*/
|
|
1866
|
+
interface google_genai extends Integration {}
|
|
1867
|
+
|
|
1868
|
+
/** @hidden */
|
|
1869
|
+
interface ExecutionArgs {
|
|
1870
|
+
schema: any,
|
|
1871
|
+
document: any,
|
|
1872
|
+
rootValue?: any,
|
|
1873
|
+
contextValue?: any,
|
|
1874
|
+
variableValues?: any,
|
|
1875
|
+
operationName?: string,
|
|
1876
|
+
fieldResolver?: any,
|
|
1877
|
+
typeResolver?: any,
|
|
1878
1878
|
}
|
|
1879
1879
|
|
|
1880
1880
|
/**
|
package/loader-hook.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import regexpEscapeModule from './vendor/dist/escape-string-regexp/index.js'
|
|
2
2
|
import * as iitm from 'import-in-the-middle/hook.mjs'
|
|
3
3
|
import hooks from './packages/datadog-instrumentations/src/helpers/hooks.js'
|
|
4
4
|
import configHelper from './packages/dd-trace/src/config-helper.js'
|
|
5
|
+
import * as rewriterLoader from './packages/datadog-instrumentations/src/helpers/rewriter/loader.mjs'
|
|
6
|
+
|
|
7
|
+
const regexpEscape = regexpEscapeModule.default
|
|
5
8
|
|
|
6
9
|
// For some reason `getEnvironmentVariable` is not otherwise available to ESM.
|
|
7
10
|
const env = configHelper.getEnvironmentVariable
|
|
@@ -17,6 +20,10 @@ function initialize (data = {}) {
|
|
|
17
20
|
return iitm.initialize(data)
|
|
18
21
|
}
|
|
19
22
|
|
|
23
|
+
function load (url, context, nextLoad) {
|
|
24
|
+
return rewriterLoader.load(url, context, (url, context) => iitm.load(url, context, nextLoad))
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
function addInstrumentations (data) {
|
|
21
28
|
const instrumentations = Object.keys(hooks)
|
|
22
29
|
|
|
@@ -48,5 +55,5 @@ function addExclusions (data) {
|
|
|
48
55
|
)
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
export { initialize }
|
|
52
|
-
export {
|
|
58
|
+
export { initialize, load }
|
|
59
|
+
export { getFormat, resolve, getSource } from 'import-in-the-middle/hook.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dd-trace",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.81.0",
|
|
4
4
|
"description": "Datadog APM tracing client for JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"bench": "node benchmark/index.js",
|
|
11
11
|
"bench:e2e:test-optimization": "node benchmark/e2e-test-optimization/benchmark-run.js",
|
|
12
12
|
"dependencies:dedupe": "yarn-deduplicate yarn.lock",
|
|
13
|
-
"type:check": "tsc --noEmit -p tsconfig.json",
|
|
14
|
-
"type:doc": "cd docs && yarn && yarn build",
|
|
15
|
-
"type:test": "cd docs && yarn && yarn test",
|
|
13
|
+
"type:check": "tsc --noEmit -p tsconfig.dev.json",
|
|
14
|
+
"type:doc:build": "cd docs && yarn && yarn build",
|
|
15
|
+
"type:doc:test": "cd docs && yarn && yarn test",
|
|
16
16
|
"lint": "node scripts/check_licenses.js && eslint . --concurrency=auto --max-warnings 0",
|
|
17
17
|
"lint:fix": "node scripts/check_licenses.js && eslint . --concurrency=auto --max-warnings 0 --fix",
|
|
18
18
|
"lint:inspect": "npx @eslint/config-inspector@latest",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"test:integration:playwright": "mocha --timeout 60000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/playwright/*.spec.js\"",
|
|
68
68
|
"test:integration:selenium": "mocha --timeout 60000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/selenium/*.spec.js\"",
|
|
69
69
|
"test:integration:vitest": "mocha --timeout 60000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/vitest/*.spec.js\"",
|
|
70
|
-
"test:integration:testopt": "mocha --timeout
|
|
70
|
+
"test:integration:testopt": "mocha --timeout 120000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/ci-visibility/*.spec.js\"",
|
|
71
71
|
"test:integration:profiler": "mocha --timeout 180000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/profiler/*.spec.js\"",
|
|
72
72
|
"test:integration:plugins": "mocha -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"",
|
|
73
73
|
"test:unit:plugins": "mocha -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/datadog-instrumentations/test/@($(echo $PLUGINS)).spec.js\" \"packages/datadog-plugin-@($(echo $PLUGINS))/test/**/*.spec.js\" --exclude \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"node": ">=18"
|
|
99
99
|
},
|
|
100
100
|
"files": [
|
|
101
|
+
"/package.json",
|
|
101
102
|
"ci/**/*",
|
|
102
103
|
"cypress/**/*",
|
|
103
104
|
"esbuild.js",
|
|
@@ -111,7 +112,6 @@
|
|
|
111
112
|
"LICENSE.Apache",
|
|
112
113
|
"LICENSE.BSD3",
|
|
113
114
|
"loader-hook.mjs",
|
|
114
|
-
"package.json",
|
|
115
115
|
"packages/*/index.js",
|
|
116
116
|
"packages/*/lib/**/*",
|
|
117
117
|
"packages/*/src/**/*",
|
|
@@ -119,65 +119,44 @@
|
|
|
119
119
|
"README.md",
|
|
120
120
|
"register.js",
|
|
121
121
|
"scripts/preinstall.js",
|
|
122
|
-
"vendor
|
|
122
|
+
"vendor/dist/**/*.d.ts",
|
|
123
|
+
"vendor/dist/**/*.js",
|
|
124
|
+
"vendor/dist/**/*.wasm",
|
|
125
|
+
"vendor/dist/**/LICENSE",
|
|
123
126
|
"version.js"
|
|
124
127
|
],
|
|
125
128
|
"dependencies": {
|
|
129
|
+
"dc-polyfill": "^0.1.10",
|
|
130
|
+
"import-in-the-middle": "^1.14.2"
|
|
131
|
+
},
|
|
132
|
+
"optionalDependencies": {
|
|
126
133
|
"@datadog/libdatadog": "0.7.0",
|
|
127
134
|
"@datadog/native-appsec": "10.3.0",
|
|
128
|
-
"@datadog/native-iast-taint-tracking": "4.
|
|
135
|
+
"@datadog/native-iast-taint-tracking": "4.1.0",
|
|
129
136
|
"@datadog/native-metrics": "3.1.1",
|
|
130
137
|
"@datadog/openfeature-node-server": "^0.2.0",
|
|
131
138
|
"@datadog/pprof": "5.12.0",
|
|
132
|
-
"@datadog/sketches-js": "2.1.1",
|
|
133
139
|
"@datadog/wasm-js-rewriter": "5.0.1",
|
|
134
|
-
"@isaacs/ttlcache": "^2.0.1",
|
|
135
140
|
"@opentelemetry/api": ">=1.0.0 <1.10.0",
|
|
136
|
-
"@opentelemetry/api-logs": "<1.0.0"
|
|
137
|
-
"@opentelemetry/core": ">=1.14.0 <1.31.0",
|
|
138
|
-
"@opentelemetry/resources": ">=1.0.0 <1.31.0",
|
|
139
|
-
"crypto-randomuuid": "^1.0.0",
|
|
140
|
-
"dc-polyfill": "^0.1.10",
|
|
141
|
-
"escape-string-regexp": "^5.0.0",
|
|
142
|
-
"ignore": "^7.0.5",
|
|
143
|
-
"import-in-the-middle": "^1.14.2",
|
|
144
|
-
"istanbul-lib-coverage": "^3.2.2",
|
|
145
|
-
"jest-docblock": "^29.7.0",
|
|
146
|
-
"jsonpath-plus": "^10.3.0",
|
|
147
|
-
"limiter": "^1.1.5",
|
|
148
|
-
"lodash.sortby": "^4.7.0",
|
|
149
|
-
"lru-cache": "^10.4.3",
|
|
150
|
-
"module-details-from-path": "^1.0.4",
|
|
151
|
-
"mutexify": "^1.4.0",
|
|
152
|
-
"opentracing": ">=0.14.7",
|
|
153
|
-
"path-to-regexp": "^0.1.12",
|
|
154
|
-
"pprof-format": "^2.1.1",
|
|
155
|
-
"protobufjs": "^7.5.3",
|
|
156
|
-
"retry": "^0.13.1",
|
|
157
|
-
"rfdc": "^1.4.1",
|
|
158
|
-
"semifies": "^1.0.0",
|
|
159
|
-
"shell-quote": "^1.8.2",
|
|
160
|
-
"source-map": "^0.7.4",
|
|
161
|
-
"tlhunter-sorted-set": "^0.1.0",
|
|
162
|
-
"ttl-set": "^1.0.0"
|
|
141
|
+
"@opentelemetry/api-logs": "<1.0.0"
|
|
163
142
|
},
|
|
164
143
|
"devDependencies": {
|
|
165
144
|
"@babel/helpers": "^7.28.4",
|
|
166
145
|
"@eslint/eslintrc": "^3.3.1",
|
|
167
146
|
"@eslint/js": "^9.39.0",
|
|
168
147
|
"@msgpack/msgpack": "^3.1.2",
|
|
169
|
-
"@openfeature/core": "^1.
|
|
148
|
+
"@openfeature/core": "^1.8.1",
|
|
170
149
|
"@openfeature/server-sdk": "~1.20.0",
|
|
171
150
|
"@stylistic/eslint-plugin": "^5.5.0",
|
|
172
151
|
"@types/chai": "^4.3.16",
|
|
173
152
|
"@types/mocha": "^10.0.10",
|
|
174
153
|
"@types/node": "^18.19.106",
|
|
175
|
-
"@types/sinon": "^
|
|
154
|
+
"@types/sinon": "^21.0.0",
|
|
176
155
|
"@types/tap": "^15.0.12",
|
|
177
156
|
"axios": "^1.12.2",
|
|
178
157
|
"benchmark": "^2.1.4",
|
|
179
158
|
"body-parser": "^2.2.0",
|
|
180
|
-
"bun": "1.3.
|
|
159
|
+
"bun": "1.3.3",
|
|
181
160
|
"chai": "^4.5.0",
|
|
182
161
|
"eslint": "^9.39.0",
|
|
183
162
|
"eslint-plugin-cypress": "^5.2.0",
|
|
@@ -199,7 +178,10 @@
|
|
|
199
178
|
"nock": "^13.5.6",
|
|
200
179
|
"nyc": "^15.1.0",
|
|
201
180
|
"octokit": "^5.0.3",
|
|
181
|
+
"opentracing": ">=0.14.7",
|
|
202
182
|
"proxyquire": "^2.1.3",
|
|
183
|
+
"retry": "^0.13.1",
|
|
184
|
+
"semifies": "^1.0.0",
|
|
203
185
|
"semver": "^7.7.2",
|
|
204
186
|
"sinon": "^21.0.0",
|
|
205
187
|
"sinon-chai": "^3.7.0",
|
|
@@ -245,28 +245,45 @@ ${build.initialOptions.banner.js}`
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
try {
|
|
249
|
+
const packageJson = JSON.parse(fs.readFileSync(pathToPackageJson).toString())
|
|
249
250
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
const isESM = isESMFile(fullPathToModule, pathToPackageJson, packageJson)
|
|
252
|
+
if (isESM && !interceptedESMModules.has(fullPathToModule)) {
|
|
253
|
+
fullPathToModule += ESM_INTERCEPTED_SUFFIX
|
|
254
|
+
}
|
|
254
255
|
|
|
255
|
-
|
|
256
|
+
if (DEBUG) console.log(`RESOLVE: ${args.path}@${packageJson.version}`)
|
|
256
257
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
258
|
+
// https://esbuild.github.io/plugins/#on-resolve-arguments
|
|
259
|
+
return {
|
|
260
|
+
path: fullPathToModule,
|
|
261
|
+
pluginData: {
|
|
262
|
+
version: packageJson.version,
|
|
263
|
+
pkg: extracted.pkg,
|
|
264
|
+
path: extracted.path,
|
|
265
|
+
full: fullPathToModule,
|
|
266
|
+
raw: args.path,
|
|
267
|
+
pkgOfInterest: true,
|
|
268
|
+
kind: args.kind,
|
|
269
|
+
internal,
|
|
270
|
+
isESM
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
} catch (e) {
|
|
274
|
+
// Skip vendored dependencies which never have a `package.json`. This
|
|
275
|
+
// will use the default resolve logic of ESBuild which is what we want
|
|
276
|
+
// since those files should be treated as regular files and not modules
|
|
277
|
+
// even though they are in a `node_modules` folder.
|
|
278
|
+
if (e.code === 'ENOENT') {
|
|
279
|
+
if (DEBUG) {
|
|
280
|
+
console.log([
|
|
281
|
+
'Skipping `package.json` lookup.',
|
|
282
|
+
'This usually means the package was vendored but could indicate an issue otherwise.'
|
|
283
|
+
].join(' '))
|
|
284
|
+
}
|
|
285
|
+
} else {
|
|
286
|
+
throw e
|
|
270
287
|
}
|
|
271
288
|
}
|
|
272
289
|
}
|
|
@@ -112,4 +112,16 @@ for (const extension of extensions) {
|
|
|
112
112
|
|
|
113
113
|
return exports
|
|
114
114
|
})
|
|
115
|
+
|
|
116
|
+
addHook({
|
|
117
|
+
name: '@anthropic-ai/sdk',
|
|
118
|
+
file: `resources/beta/messages/messages.${extension}`,
|
|
119
|
+
versions: ['>=0.33.0']
|
|
120
|
+
}, exports => {
|
|
121
|
+
const Messages = exports.Messages
|
|
122
|
+
|
|
123
|
+
shimmer.wrap(Messages.prototype, 'create', wrapCreate)
|
|
124
|
+
|
|
125
|
+
return exports
|
|
126
|
+
})
|
|
115
127
|
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const { channel, addHook } = require('./helpers/instrument')
|
|
4
4
|
const shimmer = require('../../datadog-shimmer')
|
|
5
5
|
|
|
6
|
+
const patchedClientConfigProtocols = new WeakSet()
|
|
7
|
+
|
|
6
8
|
function wrapRequest (send) {
|
|
7
9
|
return function wrappedRequest (cb) {
|
|
8
10
|
if (!this.service) return send.apply(this, arguments)
|
|
@@ -67,12 +69,14 @@ function wrapSmithySend (send) {
|
|
|
67
69
|
|
|
68
70
|
if (typeof command.deserialize === 'function') {
|
|
69
71
|
shimmer.wrap(command, 'deserialize', deserialize => wrapDeserialize(deserialize, channelSuffix))
|
|
70
|
-
} else if (this.config?.protocol?.deserializeResponse) {
|
|
72
|
+
} else if (this.config?.protocol?.deserializeResponse && !patchedClientConfigProtocols.has(this.config.protocol)) {
|
|
71
73
|
shimmer.wrap(
|
|
72
74
|
this.config.protocol,
|
|
73
75
|
'deserializeResponse',
|
|
74
76
|
deserializeResponse => wrapDeserialize(deserializeResponse, channelSuffix, 2)
|
|
75
77
|
)
|
|
78
|
+
|
|
79
|
+
patchedClientConfigProtocols.add(this.config.protocol)
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
const ctx = {
|