dd-trace 5.63.0 → 5.63.2
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/package.json +1 -1
- package/packages/datadog-instrumentations/src/moleculer/client.js +2 -3
- package/packages/dd-trace/src/config.js +13 -1
- package/packages/dd-trace/src/llmobs/span_processor.js +2 -0
- package/packages/dd-trace/src/llmobs/writers/base.js +5 -1
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +2 -2
- package/packages/dd-trace/src/supported-configurations.json +4 -0
package/package.json
CHANGED
|
@@ -21,19 +21,18 @@ function wrapCall (call) {
|
|
|
21
21
|
ctx.promiseCtx = promise.ctx
|
|
22
22
|
ctx.broker = broker
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
promise
|
|
25
25
|
.then(
|
|
26
26
|
result => {
|
|
27
27
|
finishChannel.publish(ctx)
|
|
28
|
-
return result
|
|
29
28
|
},
|
|
30
29
|
error => {
|
|
31
30
|
ctx.error = error
|
|
32
31
|
errorChannel.publish(ctx)
|
|
33
32
|
finishChannel.publish(ctx)
|
|
34
|
-
throw error
|
|
35
33
|
}
|
|
36
34
|
)
|
|
35
|
+
return promise
|
|
37
36
|
})
|
|
38
37
|
}
|
|
39
38
|
}
|
|
@@ -252,6 +252,12 @@ const sourcesOrder = [
|
|
|
252
252
|
]
|
|
253
253
|
|
|
254
254
|
class Config {
|
|
255
|
+
/**
|
|
256
|
+
* parsed DD_TAGS, usable as a standalone tag set across products
|
|
257
|
+
* @type {Record<string, string> | undefined}
|
|
258
|
+
*/
|
|
259
|
+
#parsedDdTags = {}
|
|
260
|
+
|
|
255
261
|
constructor (options = {}) {
|
|
256
262
|
if (!isInServerlessEnvironment()) {
|
|
257
263
|
// Bail out early if we're in a serverless environment, stable config isn't supported
|
|
@@ -431,6 +437,10 @@ class Config {
|
|
|
431
437
|
}
|
|
432
438
|
}
|
|
433
439
|
|
|
440
|
+
get parsedDdTags () {
|
|
441
|
+
return this.#parsedDdTags
|
|
442
|
+
}
|
|
443
|
+
|
|
434
444
|
// Supports only a subset of options for now.
|
|
435
445
|
configure (options, remote) {
|
|
436
446
|
if (remote) {
|
|
@@ -823,8 +833,10 @@ class Config {
|
|
|
823
833
|
const env = setHiddenProperty(this, '_env', {})
|
|
824
834
|
setHiddenProperty(this, '_envUnprocessed', {})
|
|
825
835
|
|
|
836
|
+
tagger.add(this.#parsedDdTags, parseSpaceSeparatedTags(DD_TAGS))
|
|
837
|
+
|
|
826
838
|
tagger.add(tags, parseSpaceSeparatedTags(handleOtel(OTEL_RESOURCE_ATTRIBUTES)))
|
|
827
|
-
tagger.add(tags,
|
|
839
|
+
tagger.add(tags, this.#parsedDdTags)
|
|
828
840
|
tagger.add(tags, DD_TRACE_TAGS)
|
|
829
841
|
tagger.add(tags, DD_TRACE_GLOBAL_TAGS)
|
|
830
842
|
|
|
@@ -178,6 +178,7 @@ class LLMObsSpanProcessor {
|
|
|
178
178
|
|
|
179
179
|
_processTags (span, mlApp, sessionId, error) {
|
|
180
180
|
let tags = {
|
|
181
|
+
...this._config.parsedDdTags,
|
|
181
182
|
version: this._config.version,
|
|
182
183
|
env: this._config.env,
|
|
183
184
|
service: this._config.service,
|
|
@@ -187,6 +188,7 @@ class LLMObsSpanProcessor {
|
|
|
187
188
|
error: Number(!!error) || 0,
|
|
188
189
|
language: 'javascript'
|
|
189
190
|
}
|
|
191
|
+
|
|
190
192
|
const errType = span.context()._tags[ERROR_TYPE] || error?.name
|
|
191
193
|
if (errType) tags.error_type = errType
|
|
192
194
|
if (sessionId) tags.session_id = sessionId
|
|
@@ -120,7 +120,11 @@ class BaseLLMObsWriter {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const { hostname, port } = this._config
|
|
123
|
-
|
|
123
|
+
|
|
124
|
+
const overrideOriginEnv = getEnvironmentVariable('_DD_LLMOBS_OVERRIDE_ORIGIN')
|
|
125
|
+
const overrideOriginUrl = overrideOriginEnv && new URL(overrideOriginEnv)
|
|
126
|
+
|
|
127
|
+
const base = overrideOriginUrl ?? this._config.url ?? new URL(format({
|
|
124
128
|
protocol: 'http:',
|
|
125
129
|
hostname,
|
|
126
130
|
port
|
|
@@ -148,13 +148,13 @@ class TextMapPropagator {
|
|
|
148
148
|
|
|
149
149
|
// Check for item count limit exceeded
|
|
150
150
|
if (itemCounter > this._config.baggageMaxItems) {
|
|
151
|
-
tracerMetrics.count('
|
|
151
|
+
tracerMetrics.count('context_header.truncated', ['truncation_reason:baggage_item_count_exceeded']).inc()
|
|
152
152
|
break
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// Check for byte count limit exceeded
|
|
156
156
|
if (byteCounter > this._config.baggageMaxBytes) {
|
|
157
|
-
tracerMetrics.count('
|
|
157
|
+
tracerMetrics.count('context_header.truncated', ['truncation_reason:baggage_byte_count_exceeded']).inc()
|
|
158
158
|
break
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
"DD_PLAYWRIGHT_WORKER": ["A"],
|
|
119
119
|
"DD_PROFILING_CODEHOTSPOTS_ENABLED": ["A"],
|
|
120
120
|
"DD_PROFILING_CPU_ENABLED": ["A"],
|
|
121
|
+
"DD_PROFILING_DEBUG_SOURCE_MAPS": ["A"],
|
|
121
122
|
"DD_PROFILING_DEBUG_UPLOAD_COMPRESSION": ["A"],
|
|
122
123
|
"DD_PROFILING_ENABLED": ["A"],
|
|
123
124
|
"DD_PROFILING_ENDPOINT_COLLECTION_ENABLED": ["A"],
|
|
@@ -127,10 +128,13 @@
|
|
|
127
128
|
"DD_PROFILING_EXPERIMENTAL_OOM_MONITORING_ENABLED": ["A"],
|
|
128
129
|
"DD_PROFILING_EXPORTERS": ["A"],
|
|
129
130
|
"DD_PROFILING_HEAP_ENABLED": ["A"],
|
|
131
|
+
"DD_PROFILING_HEAP_SAMPLING_INTERVAL": ["A"],
|
|
132
|
+
"DD_PROFILING_PPROF_PREFIX": ["A"],
|
|
130
133
|
"DD_PROFILING_PROFILERS": ["A"],
|
|
131
134
|
"DD_PROFILING_SOURCE_MAP": ["A"],
|
|
132
135
|
"DD_PROFILING_TIMELINE_ENABLED": ["A"],
|
|
133
136
|
"DD_PROFILING_UPLOAD_PERIOD": ["A"],
|
|
137
|
+
"DD_PROFILING_UPLOAD_TIMEOUT": ["A"],
|
|
134
138
|
"DD_PROFILING_V8_PROFILER_BUG_WORKAROUND": ["A"],
|
|
135
139
|
"DD_PROFILING_WALLTIME_ENABLED": ["A"],
|
|
136
140
|
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": ["A"],
|