dd-trace 5.49.0 → 5.50.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.
Files changed (25) hide show
  1. package/LICENSE-3rdparty.csv +1 -4
  2. package/README.md +5 -15
  3. package/index.d.ts +1 -0
  4. package/package.json +4 -8
  5. package/packages/datadog-core/src/storage.js +4 -3
  6. package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +0 -1
  7. package/packages/datadog-shimmer/src/shimmer.js +76 -68
  8. package/packages/dd-trace/src/appsec/iast/analyzers/cookie-analyzer.js +1 -17
  9. package/packages/dd-trace/src/appsec/iast/iast-plugin.js +1 -1
  10. package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/ldap-sensitive-analyzer.js +1 -1
  11. package/packages/dd-trace/src/config.js +24 -32
  12. package/packages/dd-trace/src/datastreams/processor.js +3 -5
  13. package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +34 -16
  14. package/packages/dd-trace/src/debugger/devtools_client/remote_config.js +1 -1
  15. package/packages/dd-trace/src/debugger/devtools_client/send.js +1 -1
  16. package/packages/dd-trace/src/dogstatsd.js +11 -4
  17. package/packages/dd-trace/src/llmobs/index.js +4 -1
  18. package/packages/dd-trace/src/llmobs/sdk.js +146 -112
  19. package/packages/dd-trace/src/llmobs/tagger.js +13 -9
  20. package/packages/dd-trace/src/llmobs/telemetry.js +50 -1
  21. package/packages/dd-trace/src/payload-tagging/jsonpath-plus.js +1 -1
  22. package/packages/dd-trace/src/profiling/config.js +0 -6
  23. package/packages/dd-trace/src/profiling/profilers/wall.js +8 -12
  24. package/packages/dd-trace/src/span_stats.js +2 -2
  25. package/packages/dd-trace/src/debugger/devtools_client/lock.js +0 -8
@@ -70,16 +70,12 @@ function ensureChannelsActivated () {
70
70
  class NativeWallProfiler {
71
71
  constructor (options = {}) {
72
72
  this.type = 'wall'
73
- // Currently there's a crash sometimes on worker threads trying to collect async IDs so for the
74
- // time being we'll constrain it to only the main thread.
75
- this._asyncIdEnabled = !!options.asyncIdEnabled && require('worker_threads').isMainThread
73
+ this._samplingIntervalMicros = options.samplingInterval || 1e6 / 99 // 99hz
74
+ this._flushIntervalMillis = options.flushInterval || 60 * 1e3 // 60 seconds
76
75
  this._codeHotspotsEnabled = !!options.codeHotspotsEnabled
77
- this._cpuProfilingEnabled = !!options.cpuProfilingEnabled
78
76
  this._endpointCollectionEnabled = !!options.endpointCollectionEnabled
79
- this._flushIntervalMillis = options.flushInterval || 60 * 1e3 // 60 seconds
80
- this._samplingIntervalMicros = options.samplingInterval || 1e6 / 99 // 99hz
81
77
  this._timelineEnabled = !!options.timelineEnabled
82
- this._v8ProfilerBugWorkaroundEnabled = !!options.v8ProfilerBugWorkaroundEnabled
78
+ this._cpuProfilingEnabled = !!options.cpuProfilingEnabled
83
79
  // We need to capture span data into the sample context for either code hotspots
84
80
  // or endpoint collection.
85
81
  this._captureSpanData = this._codeHotspotsEnabled || this._endpointCollectionEnabled
@@ -88,6 +84,7 @@ class NativeWallProfiler {
88
84
  // timestamps require the sample contexts feature in the pprof wall profiler), or
89
85
  // cpu profiling is enabled.
90
86
  this._withContexts = this._captureSpanData || this._timelineEnabled || this._cpuProfilingEnabled
87
+ this._v8ProfilerBugWorkaroundEnabled = !!options.v8ProfilerBugWorkaroundEnabled
91
88
  this._mapper = undefined
92
89
  this._pprof = undefined
93
90
 
@@ -128,14 +125,13 @@ class NativeWallProfiler {
128
125
  }
129
126
 
130
127
  this._pprof.time.start({
131
- collectAsyncId: this._asyncIdEnabled,
132
- collectCpuTime: this._cpuProfilingEnabled,
133
- durationMillis: this._flushIntervalMillis,
134
128
  intervalMicros: this._samplingIntervalMicros,
135
- lineNumbers: false,
129
+ durationMillis: this._flushIntervalMillis,
136
130
  sourceMapper: this._mapper,
137
131
  withContexts: this._withContexts,
138
- workaroundV8Bug: this._v8ProfilerBugWorkaroundEnabled
132
+ lineNumbers: false,
133
+ workaroundV8Bug: this._v8ProfilerBugWorkaroundEnabled,
134
+ collectCpuTime: this._cpuProfilingEnabled
139
135
  })
140
136
 
141
137
  if (this._withContexts) {
@@ -23,8 +23,8 @@ class SpanAggStats {
23
23
  this.topLevelHits = 0
24
24
  this.errors = 0
25
25
  this.duration = 0
26
- this.okDistribution = new LogCollapsingLowestDenseDDSketch(0.00775)
27
- this.errorDistribution = new LogCollapsingLowestDenseDDSketch(0.00775)
26
+ this.okDistribution = new LogCollapsingLowestDenseDDSketch()
27
+ this.errorDistribution = new LogCollapsingLowestDenseDDSketch()
28
28
  }
29
29
 
30
30
  record (span) {
@@ -1,8 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = () => async function lock () {
4
- if (lock.p) await lock.p
5
- let resolve
6
- lock.p = new Promise((_resolve) => { resolve = _resolve }).then(() => { lock.p = null })
7
- return resolve
8
- }