dd-trace 5.49.0 → 5.49.1
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 +1 -4
- package/README.md +2 -2
- package/package.json +3 -6
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +0 -1
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/ldap-sensitive-analyzer.js +1 -1
- package/packages/dd-trace/src/config.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +34 -16
- package/packages/dd-trace/src/debugger/devtools_client/remote_config.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/send.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/lock.js +0 -8
package/LICENSE-3rdparty.csv
CHANGED
|
@@ -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,7 +32,6 @@ 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,@apollo/server,MIT,Copyright (c) 2016-2020 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
|
|
35
35
|
dev,@babel/helpers,MIT,Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
36
36
|
dev,@types/node,MIT,Copyright Authors
|
|
37
37
|
dev,@eslint/eslintrc,MIT,Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
@@ -39,7 +39,6 @@ dev,@eslint/js,MIT,Copyright OpenJS Foundation and other contributors, <www.open
|
|
|
39
39
|
dev,@msgpack/msgpack,ISC,Copyright 2019 The MessagePack Community
|
|
40
40
|
dev,@stylistic/eslint-plugin-js,MIT,Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
41
41
|
dev,autocannon,MIT,Copyright 2016 Matteo Collina
|
|
42
|
-
dev,aws-sdk,Apache 2.0,Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
42
|
dev,axios,MIT,Copyright 2014-present Matt Zabriskie
|
|
44
43
|
dev,benchmark,MIT,Copyright 2010-2016 Mathias Bynens Robert Kieffer John-David Dalton
|
|
45
44
|
dev,body-parser,MIT,Copyright 2014 Jonathan Ong 2014-2015 Douglas Christopher Wilson
|
|
@@ -48,7 +47,6 @@ dev,chalk,MIT,Copyright Sindre Sorhus
|
|
|
48
47
|
dev,checksum,MIT,Copyright Daniel D. Shaw
|
|
49
48
|
dev,cli-table3,MIT,Copyright 2014 James Talmage
|
|
50
49
|
dev,dotenv,BSD-2-Clause,Copyright 2015 Scott Motte
|
|
51
|
-
dev,esbuild,MIT,Copyright (c) 2020 Evan Wallace
|
|
52
50
|
dev,eslint,MIT,Copyright JS Foundation and other contributors https://js.foundation
|
|
53
51
|
dev,eslint-config-standard,MIT,Copyright Feross Aboukhadijeh
|
|
54
52
|
dev,eslint-plugin-import,MIT,Copyright 2015 Ben Mosher
|
|
@@ -62,7 +60,6 @@ dev,glob,ISC,Copyright Isaac Z. Schlueter and Contributors
|
|
|
62
60
|
dev,globals,MIT,Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
63
61
|
dev,graphql,MIT,Copyright 2015 Facebook Inc.
|
|
64
62
|
dev,jszip,MIT,Copyright 2015-2016 Stuart Knightley and contributors
|
|
65
|
-
dev,knex,MIT,Copyright (c) 2013-present Tim Griesser
|
|
66
63
|
dev,mkdirp,MIT,Copyright 2010 James Halliday
|
|
67
64
|
dev,mocha,MIT,Copyright 2011-2018 JS Foundation and contributors https://js.foundation
|
|
68
65
|
dev,multer,MIT,Copyright 2014 Hage Yaapa
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
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
|
|
|
@@ -59,7 +59,7 @@ When a new release line is introduced the previous release line then enters main
|
|
|
59
59
|
Once that year is up the release line enters End of Life and will not receive new updates.
|
|
60
60
|
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
61
|
|
|
62
|
-
For more information about library versioning and compatibility, see the [
|
|
62
|
+
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
63
|
|
|
64
64
|
Changes associated with each individual release are documented on the [GitHub Releases](https://github.com/DataDog/dd-trace-js/releases) screen.
|
|
65
65
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dd-trace",
|
|
3
|
-
"version": "5.49.
|
|
3
|
+
"version": "5.49.1",
|
|
4
4
|
"description": "Datadog APM tracing client for JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
"lodash.sortby": "^4.7.0",
|
|
107
107
|
"lru-cache": "^7.14.0",
|
|
108
108
|
"module-details-from-path": "^1.0.3",
|
|
109
|
+
"mutexify": "^1.4.0",
|
|
109
110
|
"opentracing": ">=0.12.1",
|
|
110
111
|
"path-to-regexp": "^0.1.12",
|
|
111
112
|
"pprof-format": "^2.1.0",
|
|
@@ -119,7 +120,6 @@
|
|
|
119
120
|
"ttl-set": "^1.0.0"
|
|
120
121
|
},
|
|
121
122
|
"devDependencies": {
|
|
122
|
-
"@apollo/server": "^4.11.0",
|
|
123
123
|
"@babel/helpers": "^7.26.10",
|
|
124
124
|
"@eslint/eslintrc": "^3.2.0",
|
|
125
125
|
"@eslint/js": "^9.19.0",
|
|
@@ -127,7 +127,6 @@
|
|
|
127
127
|
"@stylistic/eslint-plugin-js": "^3.0.1",
|
|
128
128
|
"@types/node": "^16.0.0",
|
|
129
129
|
"autocannon": "^4.5.2",
|
|
130
|
-
"aws-sdk": "^2.1446.0",
|
|
131
130
|
"axios": "^1.8.2",
|
|
132
131
|
"benchmark": "^2.1.4",
|
|
133
132
|
"body-parser": "^1.20.3",
|
|
@@ -136,7 +135,6 @@
|
|
|
136
135
|
"checksum": "^1.0.0",
|
|
137
136
|
"cli-table3": "^0.6.3",
|
|
138
137
|
"dotenv": "16.3.1",
|
|
139
|
-
"esbuild": "^0.25.0",
|
|
140
138
|
"eslint": "^9.19.0",
|
|
141
139
|
"eslint-config-standard": "^17.1.0",
|
|
142
140
|
"eslint-plugin-import": "^2.31.0",
|
|
@@ -145,12 +143,11 @@
|
|
|
145
143
|
"eslint-plugin-promise": "^7.2.1",
|
|
146
144
|
"eslint-plugin-unicorn": "^57.0.0",
|
|
147
145
|
"express": "^4.21.2",
|
|
148
|
-
"get-port": "^
|
|
146
|
+
"get-port": "^5.1.1",
|
|
149
147
|
"glob": "^7.1.6",
|
|
150
148
|
"globals": "^15.10.0",
|
|
151
149
|
"graphql": "0.13.2",
|
|
152
150
|
"jszip": "^3.5.0",
|
|
153
|
-
"knex": "^2.4.2",
|
|
154
151
|
"mkdirp": "^3.0.1",
|
|
155
152
|
"mocha": "^10",
|
|
156
153
|
"multer": "^1.4.5-lts.1",
|
|
@@ -13,7 +13,7 @@ module.exports = function extractSensitiveRanges (evidence) {
|
|
|
13
13
|
let regexResult = pattern.exec(evidence.value)
|
|
14
14
|
while (regexResult != null) {
|
|
15
15
|
if (!regexResult.groups.LITERAL) continue
|
|
16
|
-
// Computing indices manually since
|
|
16
|
+
// Computing indices manually since Node.js 12 does not support d flag on regular expressions
|
|
17
17
|
// TODO Get indices from group by adding d flag in regular expression
|
|
18
18
|
const start = regexResult.index + (regexResult[0].length - regexResult.groups.LITERAL.length - 1)
|
|
19
19
|
const end = start + regexResult.groups.LITERAL.length
|
|
@@ -594,10 +594,10 @@ class Config {
|
|
|
594
594
|
this._setValue(defaults, 'url', undefined)
|
|
595
595
|
this._setValue(defaults, 'version', pkg.version)
|
|
596
596
|
this._setValue(defaults, 'instrumentation_config_id', undefined)
|
|
597
|
-
this._setValue(defaults, 'aws.dynamoDb.tablePrimaryKeys', undefined)
|
|
598
597
|
this._setValue(defaults, 'vertexai.spanCharLimit', 128)
|
|
599
598
|
this._setValue(defaults, 'vertexai.spanPromptCompletionSampleRate', 1.0)
|
|
600
599
|
this._setValue(defaults, 'trace.aws.addSpanPointers', true)
|
|
600
|
+
this._setValue(defaults, 'trace.dynamoDb.tablePrimaryKeys', undefined)
|
|
601
601
|
this._setValue(defaults, 'trace.nativeSpanEvents', false)
|
|
602
602
|
}
|
|
603
603
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const lock = require('mutexify/promise')()
|
|
3
4
|
const { getGeneratedPosition } = require('./source-maps')
|
|
4
|
-
const lock = require('./lock')()
|
|
5
5
|
const session = require('./session')
|
|
6
6
|
const { compile: compileCondition, compileSegments, templateRequiresEvaluation } = require('./condition')
|
|
7
7
|
const { MAX_SNAPSHOTS_PER_SECOND_PER_PROBE, MAX_NON_SNAPSHOTS_PER_SECOND_PER_PROBE } = require('./defaults')
|
|
@@ -64,14 +64,14 @@ async function addBreakpoint (probe) {
|
|
|
64
64
|
const release = await lock()
|
|
65
65
|
|
|
66
66
|
try {
|
|
67
|
-
log.debug(
|
|
68
|
-
'[debugger:devtools_client] Adding breakpoint at %s:%d:%d (probe: %s, version: %d)',
|
|
69
|
-
url, lineNumber, columnNumber, probe.id, probe.version
|
|
70
|
-
)
|
|
71
|
-
|
|
72
67
|
const locationKey = generateLocationKey(scriptId, lineNumber, columnNumber)
|
|
73
68
|
const breakpoint = locationToBreakpoint.get(locationKey)
|
|
74
69
|
|
|
70
|
+
log.debug(
|
|
71
|
+
'[debugger:devtools_client] %s breakpoint at %s:%d:%d (probe: %s, version: %d)',
|
|
72
|
+
breakpoint ? 'Updating' : 'Adding', url, lineNumber, columnNumber, probe.id, probe.version
|
|
73
|
+
)
|
|
74
|
+
|
|
75
75
|
if (breakpoint) {
|
|
76
76
|
// A breakpoint already exists at this location, so we need to add the probe to the existing breakpoint
|
|
77
77
|
await updateBreakpoint(breakpoint, probe)
|
|
@@ -82,10 +82,15 @@ async function addBreakpoint (probe) {
|
|
|
82
82
|
lineNumber: lineNumber - 1, // Beware! lineNumber is zero-indexed
|
|
83
83
|
columnNumber
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
let result
|
|
86
|
+
try {
|
|
87
|
+
result = await session.post('Debugger.setBreakpoint', {
|
|
88
|
+
location,
|
|
89
|
+
condition: probe.condition
|
|
90
|
+
})
|
|
91
|
+
} catch (err) {
|
|
92
|
+
throw new Error(`Error setting breakpoint for probe ${probe.id}`, { cause: err })
|
|
93
|
+
}
|
|
89
94
|
probeToLocation.set(probe.id, locationKey)
|
|
90
95
|
locationToBreakpoint.set(locationKey, { id: result.breakpointId, location, locationKey })
|
|
91
96
|
breakpointToProbes.set(result.breakpointId, new Map([[probe.id, probe]]))
|
|
@@ -120,7 +125,11 @@ async function removeBreakpoint ({ id }) {
|
|
|
120
125
|
if (breakpointToProbes.size === 0) {
|
|
121
126
|
await stop() // TODO: Will this actually delete the breakpoint?
|
|
122
127
|
} else {
|
|
123
|
-
|
|
128
|
+
try {
|
|
129
|
+
await session.post('Debugger.removeBreakpoint', { breakpointId: breakpoint.id })
|
|
130
|
+
} catch (err) {
|
|
131
|
+
throw new Error(`Error removing breakpoint for probe ${id}`, { cause: err })
|
|
132
|
+
}
|
|
124
133
|
}
|
|
125
134
|
} else {
|
|
126
135
|
await updateBreakpoint(breakpoint)
|
|
@@ -144,12 +153,21 @@ async function updateBreakpoint (breakpoint, probe) {
|
|
|
144
153
|
const condition = compileCompoundCondition(Array.from(probesAtLocation.values()))
|
|
145
154
|
|
|
146
155
|
if (condition || conditionBeforeNewProbe !== condition) {
|
|
147
|
-
|
|
156
|
+
try {
|
|
157
|
+
await session.post('Debugger.removeBreakpoint', { breakpointId: breakpoint.id })
|
|
158
|
+
} catch (err) {
|
|
159
|
+
throw new Error(`Error removing breakpoint for probe ${probe.id}`, { cause: err })
|
|
160
|
+
}
|
|
148
161
|
breakpointToProbes.delete(breakpoint.id)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
162
|
+
let result
|
|
163
|
+
try {
|
|
164
|
+
result = await session.post('Debugger.setBreakpoint', {
|
|
165
|
+
location: breakpoint.location,
|
|
166
|
+
condition
|
|
167
|
+
})
|
|
168
|
+
} catch (err) {
|
|
169
|
+
throw new Error(`Error setting breakpoint for probe ${probe.id}`, { cause: err })
|
|
170
|
+
}
|
|
153
171
|
breakpoint.id = result.breakpointId
|
|
154
172
|
breakpointToProbes.set(result.breakpointId, probesAtLocation)
|
|
155
173
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const { workerData: { rcPort } } = require('node:worker_threads')
|
|
4
|
-
const lock = require('
|
|
4
|
+
const lock = require('mutexify/promise')()
|
|
5
5
|
const { addBreakpoint, removeBreakpoint } = require('./breakpoints')
|
|
6
6
|
const { ackReceived, ackInstalled, ackError } = require('./status')
|
|
7
7
|
const log = require('../../log')
|
|
@@ -26,7 +26,7 @@ const ddtags = [
|
|
|
26
26
|
['host_name', hostname],
|
|
27
27
|
[GIT_COMMIT_SHA, config.commitSHA],
|
|
28
28
|
[GIT_REPOSITORY_URL, config.repositoryUrl]
|
|
29
|
-
].map((pair) => pair.join(':')).join(',')
|
|
29
|
+
].filter(([, value]) => value !== undefined).map((pair) => pair.join(':')).join(',')
|
|
30
30
|
|
|
31
31
|
const path = `/debugger/v1/input?${stringify({ ddtags })}`
|
|
32
32
|
|