@mastra/datadog 1.2.3 → 1.2.4
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/CHANGELOG.md +30 -0
- package/dist/bridge.d.ts +2 -1
- package/dist/bridge.d.ts.map +1 -1
- package/dist/index.cjs +50 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -6
- package/dist/index.js.map +1 -1
- package/dist/tracing.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @mastra/datadog
|
|
2
2
|
|
|
3
|
+
## 1.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed DatadogBridge score forwarding to Datadog LLM Observability. ([#17540](https://github.com/mastra-ai/mastra/pull/17540))
|
|
8
|
+
|
|
9
|
+
- Fixed missing model options and tool calls in Datadog LLM Observability spans. ([#17693](https://github.com/mastra-ai/mastra/pull/17693))
|
|
10
|
+
|
|
11
|
+
**Forward model request options** — Model call settings (temperature, maxOutputTokens) and provider-specific options (like OpenAI's reasoningEffort) now reach Datadog. Previously they were stripped before export, so they never appeared on the LLM span. They now show up under the span's metadata, alongside the available tools and tool choice.
|
|
12
|
+
|
|
13
|
+
**Render tool calls in conversation history** — Tool calls in an LLM's input messages now render correctly in Datadog instead of appearing as empty objects. Previously the raw tool-call shape was passed through unchanged and dropped by Datadog's tracer, losing tool calls from the conversation history. Output tool calls were already handled; input now matches.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`d468acb`](https://github.com/mastra-ai/mastra/commit/d468acb07aec1bb19a2cb0ada8042b05b46746b2), [`575f815`](https://github.com/mastra-ai/mastra/commit/575f815c5c3567b71c0b83cbb7fa98c8253a9d9c), [`34839c1`](https://github.com/mastra-ai/mastra/commit/34839c1910b6964bf59ed0cee58844efebbb684e), [`053735a`](https://github.com/mastra-ai/mastra/commit/053735a75c2c18e23ce34d9468007efa4a45f4c4), [`306909a`](https://github.com/mastra-ai/mastra/commit/306909a693de77d709b38706e2673c9547d24a28), [`5191af8`](https://github.com/mastra-ai/mastra/commit/5191af80c799eea25357c545fc05d91b3883531d), [`43bd3d4`](https://github.com/mastra-ai/mastra/commit/43bd3d421987463fdf35386a45199c49499ed069), [`e6fa79e`](https://github.com/mastra-ai/mastra/commit/e6fa79ec72a2ddffdd25e85270398951e9d552a4), [`904bcdf`](https://github.com/mastra-ai/mastra/commit/904bcdf7b8004aa7be823f9f70ca63580e47e470), [`7f5ee1d`](https://github.com/mastra-ai/mastra/commit/7f5ee1dca46daee8d2817f2ebe49e6335da81956), [`1e9aab5`](https://github.com/mastra-ai/mastra/commit/1e9aab50ff11e6e88fde4d7cbf512c44a9fe8d61), [`2bccba4`](https://github.com/mastra-ai/mastra/commit/2bccba4c03cadc815c2d54cbf4dd43a922140a8d), [`bf8eb6d`](https://github.com/mastra-ai/mastra/commit/bf8eb6d0ec213a403eb9265a594ad283c44ab3dc), [`e9be4e7`](https://github.com/mastra-ai/mastra/commit/e9be4e747ec3d8b65548bff92f9377db06105376), [`493a328`](https://github.com/mastra-ai/mastra/commit/493a328f4346a1deeb9f1e2e44c8f2a3a4d7591b), [`d53cfc2`](https://github.com/mastra-ai/mastra/commit/d53cfc2c7f8d78343a4aa84ec4e129ba25f3325e), [`65799d4`](https://github.com/mastra-ai/mastra/commit/65799d4d549e5ebb9c848fbe3f51ac090f64becf), [`c268c89`](https://github.com/mastra-ai/mastra/commit/c268c89f4c63a93ee474d3cffdf3ea60bf00d4f2), [`34839c1`](https://github.com/mastra-ai/mastra/commit/34839c1910b6964bf59ed0cee58844efebbb684e), [`014e00f`](https://github.com/mastra-ai/mastra/commit/014e00f2b3a597a016b72f9901c6ab27d491f822), [`029a414`](https://github.com/mastra-ai/mastra/commit/029a4141719793bd3e898a39eb5a0466a55f5f3a), [`d468acb`](https://github.com/mastra-ai/mastra/commit/d468acb07aec1bb19a2cb0ada8042b05b46746b2), [`b147b29`](https://github.com/mastra-ai/mastra/commit/b147b2907f0cd1aa812efe6d6e3f58d22e66fc88), [`d371ac1`](https://github.com/mastra-ai/mastra/commit/d371ac1d9820afaaf7cfdbc380a475946a994d8f), [`2bccba4`](https://github.com/mastra-ai/mastra/commit/2bccba4c03cadc815c2d54cbf4dd43a922140a8d), [`0c72f03`](https://github.com/mastra-ai/mastra/commit/0c72f032abb13254df5a7856d64be2f207b8006d), [`cf182b7`](https://github.com/mastra-ai/mastra/commit/cf182b7fb495767946d9840ef29f19cfa906f31f), [`3b45ea9`](https://github.com/mastra-ai/mastra/commit/3b45ea95015557a6cb9d70dc5252af54ab1b78ac), [`a049c2a`](https://github.com/mastra-ai/mastra/commit/a049c2a9dfb41d0ee2e7a28874a88cd64fd5669f), [`f084be1`](https://github.com/mastra-ai/mastra/commit/f084be1fcbe33ad7480913e44d6130c421c0976f), [`b147b29`](https://github.com/mastra-ai/mastra/commit/b147b2907f0cd1aa812efe6d6e3f58d22e66fc88), [`2a96528`](https://github.com/mastra-ai/mastra/commit/2a9652848dfa3c5a2426f952e9d93554c26fd90f), [`f2ab060`](https://github.com/mastra-ai/mastra/commit/f2ab060162bea81505fda553e2cee29c1979fd04), [`5d302c8`](https://github.com/mastra-ai/mastra/commit/5d302c8eda1a6ac74eab5e442c4f64db6cc97a06), [`34839c1`](https://github.com/mastra-ai/mastra/commit/34839c1910b6964bf59ed0cee58844efebbb684e), [`a952852`](https://github.com/mastra-ai/mastra/commit/a952852c971a21fb646cd907c75fcf4443cdc963), [`2656d9c`](https://github.com/mastra-ai/mastra/commit/2656d9c2976d4f3354253bfbbbf9b88a1b2bbf34), [`63e3fe1`](https://github.com/mastra-ai/mastra/commit/63e3fe13cc1ea96f91d7c68aea92f400faf9e4da), [`1d4ce8d`](https://github.com/mastra-ai/mastra/commit/1d4ce8daaa54511f325c1b609d31b8e54009d677), [`8c68372`](https://github.com/mastra-ai/mastra/commit/8c68372e85fe0b066ec12c58bd29ffb93e54c552)]:
|
|
16
|
+
- @mastra/core@1.42.0
|
|
17
|
+
|
|
18
|
+
## 1.2.4-alpha.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Fixed DatadogBridge score forwarding to Datadog LLM Observability. ([#17540](https://github.com/mastra-ai/mastra/pull/17540))
|
|
23
|
+
|
|
24
|
+
- Fixed missing model options and tool calls in Datadog LLM Observability spans. ([#17693](https://github.com/mastra-ai/mastra/pull/17693))
|
|
25
|
+
|
|
26
|
+
**Forward model request options** — Model call settings (temperature, maxOutputTokens) and provider-specific options (like OpenAI's reasoningEffort) now reach Datadog. Previously they were stripped before export, so they never appeared on the LLM span. They now show up under the span's metadata, alongside the available tools and tool choice.
|
|
27
|
+
|
|
28
|
+
**Render tool calls in conversation history** — Tool calls in an LLM's input messages now render correctly in Datadog instead of appearing as empty objects. Previously the raw tool-call shape was passed through unchanged and dropped by Datadog's tracer, losing tool calls from the conversation history. Output tool calls were already handled; input now matches.
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [[`575f815`](https://github.com/mastra-ai/mastra/commit/575f815c5c3567b71c0b83cbb7fa98c8253a9d9c), [`306909a`](https://github.com/mastra-ai/mastra/commit/306909a693de77d709b38706e2673c9547d24a28), [`5191af8`](https://github.com/mastra-ai/mastra/commit/5191af80c799eea25357c545fc05d91b3883531d), [`43bd3d4`](https://github.com/mastra-ai/mastra/commit/43bd3d421987463fdf35386a45199c49499ed069), [`e6fa79e`](https://github.com/mastra-ai/mastra/commit/e6fa79ec72a2ddffdd25e85270398951e9d552a4), [`904bcdf`](https://github.com/mastra-ai/mastra/commit/904bcdf7b8004aa7be823f9f70ca63580e47e470), [`7f5ee1d`](https://github.com/mastra-ai/mastra/commit/7f5ee1dca46daee8d2817f2ebe49e6335da81956), [`1e9aab5`](https://github.com/mastra-ai/mastra/commit/1e9aab50ff11e6e88fde4d7cbf512c44a9fe8d61), [`bf8eb6d`](https://github.com/mastra-ai/mastra/commit/bf8eb6d0ec213a403eb9265a594ad283c44ab3dc), [`493a328`](https://github.com/mastra-ai/mastra/commit/493a328f4346a1deeb9f1e2e44c8f2a3a4d7591b), [`029a414`](https://github.com/mastra-ai/mastra/commit/029a4141719793bd3e898a39eb5a0466a55f5f3a), [`b147b29`](https://github.com/mastra-ai/mastra/commit/b147b2907f0cd1aa812efe6d6e3f58d22e66fc88), [`d371ac1`](https://github.com/mastra-ai/mastra/commit/d371ac1d9820afaaf7cfdbc380a475946a994d8f), [`cf182b7`](https://github.com/mastra-ai/mastra/commit/cf182b7fb495767946d9840ef29f19cfa906f31f), [`a049c2a`](https://github.com/mastra-ai/mastra/commit/a049c2a9dfb41d0ee2e7a28874a88cd64fd5669f), [`b147b29`](https://github.com/mastra-ai/mastra/commit/b147b2907f0cd1aa812efe6d6e3f58d22e66fc88), [`2a96528`](https://github.com/mastra-ai/mastra/commit/2a9652848dfa3c5a2426f952e9d93554c26fd90f), [`2656d9c`](https://github.com/mastra-ai/mastra/commit/2656d9c2976d4f3354253bfbbbf9b88a1b2bbf34), [`63e3fe1`](https://github.com/mastra-ai/mastra/commit/63e3fe13cc1ea96f91d7c68aea92f400faf9e4da), [`1d4ce8d`](https://github.com/mastra-ai/mastra/commit/1d4ce8daaa54511f325c1b609d31b8e54009d677), [`8c68372`](https://github.com/mastra-ai/mastra/commit/8c68372e85fe0b066ec12c58bd29ffb93e54c552)]:
|
|
31
|
+
- @mastra/core@1.42.0-alpha.4
|
|
32
|
+
|
|
3
33
|
## 1.2.3
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/bridge.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* dd-trace's auto-instrumentation can't find the correct parent, so APM spans
|
|
15
15
|
* fall back to the nearest active span (typically the request handler).
|
|
16
16
|
*/
|
|
17
|
-
import type { TracingEvent, ObservabilityBridge, CreateSpanOptions, SpanType, SpanIds } from '@mastra/core/observability';
|
|
17
|
+
import type { TracingEvent, ObservabilityBridge, CreateSpanOptions, ScoreEvent, SpanType, SpanIds } from '@mastra/core/observability';
|
|
18
18
|
import { BaseExporter } from '@mastra/observability';
|
|
19
19
|
import type { BaseExporterConfig } from '@mastra/observability';
|
|
20
20
|
/**
|
|
@@ -97,6 +97,7 @@ export declare class DatadogBridge extends BaseExporter implements Observability
|
|
|
97
97
|
* Execute a synchronous function within the dd-trace context of a Mastra span.
|
|
98
98
|
*/
|
|
99
99
|
executeInContextSync<T>(spanId: string, fn: () => T): T;
|
|
100
|
+
onScoreEvent(event: ScoreEvent): Promise<void>;
|
|
100
101
|
private executeWithSpanContext;
|
|
101
102
|
/**
|
|
102
103
|
* Handle tracing events from the observability bus.
|
package/dist/bridge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,YAAY,EAKZ,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACR,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AA+DhE;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,YAAa,YAAW,mBAAmB;IAC5E,IAAI,SAAoB;IAExB,OAAO,CAAC,MAAM,CAA8E;IAC5F,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,cAAc,CAA6B;gBAEvC,MAAM,GAAE,mBAAwB;
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,YAAY,EAKZ,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,OAAO,EACR,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AA+DhE;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,YAAa,YAAW,mBAAmB;IAC5E,IAAI,SAAoB;IAExB,OAAO,CAAC,MAAM,CAA8E;IAC5F,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,cAAc,CAA6B;gBAEvC,MAAM,GAAE,mBAAwB;IAgD5C;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAAG,OAAO,GAAG,SAAS;IAgErE;;OAEG;IACH,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIrE;;OAEG;IACH,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAIjD,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCpD,OAAO,CAAC,sBAAsB;IAmB9B;;OAEG;cACa,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BvE,OAAO,CAAC,kBAAkB;IA0C1B,OAAO,CAAC,eAAe;IASvB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAwD7B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,gBAAgB;IAiGxB,OAAO,CAAC,YAAY;IASd,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CA2BhC"}
|
package/dist/index.cjs
CHANGED
|
@@ -130,8 +130,8 @@ function toDatadogMessages(messages) {
|
|
|
130
130
|
role: m.role,
|
|
131
131
|
content: m.content == null ? "" : toMessageContent(m.content)
|
|
132
132
|
};
|
|
133
|
-
if (m.toolCalls) {
|
|
134
|
-
message.toolCalls = m.toolCalls;
|
|
133
|
+
if (Array.isArray(m.toolCalls) && m.toolCalls.length > 0) {
|
|
134
|
+
message.toolCalls = toDatadogToolCalls(m.toolCalls);
|
|
135
135
|
}
|
|
136
136
|
return message;
|
|
137
137
|
}).filter((m) => !(m.role === "user" && m.content.trim().length === 0));
|
|
@@ -154,7 +154,7 @@ function parseToolArguments(args) {
|
|
|
154
154
|
function toDatadogToolCalls(toolCalls) {
|
|
155
155
|
return toolCalls.map((c) => ({
|
|
156
156
|
name: c?.toolName ?? c?.name ?? c?.function?.name ?? "unknown",
|
|
157
|
-
arguments: parseToolArguments(c?.args ?? c?.input ?? c?.function?.arguments),
|
|
157
|
+
arguments: parseToolArguments(c?.args ?? c?.input ?? c?.arguments ?? c?.function?.arguments),
|
|
158
158
|
toolId: c?.toolCallId ?? c?.toolId ?? c?.id,
|
|
159
159
|
type: c?.type === "function" ? c.type : "function"
|
|
160
160
|
}));
|
|
@@ -277,7 +277,14 @@ var DatadogBridge = class extends observability.BaseExporter {
|
|
|
277
277
|
this.config = config;
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
|
-
this.config = {
|
|
280
|
+
this.config = {
|
|
281
|
+
...config,
|
|
282
|
+
mlApp,
|
|
283
|
+
site,
|
|
284
|
+
apiKey,
|
|
285
|
+
agentless,
|
|
286
|
+
env
|
|
287
|
+
};
|
|
281
288
|
ensureTracer({
|
|
282
289
|
mlApp,
|
|
283
290
|
site,
|
|
@@ -349,6 +356,37 @@ var DatadogBridge = class extends observability.BaseExporter {
|
|
|
349
356
|
executeInContextSync(spanId, fn) {
|
|
350
357
|
return this.executeWithSpanContext(spanId, fn);
|
|
351
358
|
}
|
|
359
|
+
async onScoreEvent(event) {
|
|
360
|
+
if (this.isDisabled || !tracer3__default.default.llmobs?.submitEvaluation) return;
|
|
361
|
+
const { score } = event;
|
|
362
|
+
if (!score.traceId || !score.spanId) {
|
|
363
|
+
this.logger.warn("Datadog bridge: dropping score with no traceId/spanId", {
|
|
364
|
+
scorerId: score.scorerId
|
|
365
|
+
});
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
try {
|
|
369
|
+
tracer3__default.default.llmobs.submitEvaluation(
|
|
370
|
+
{ traceId: score.traceId, spanId: toDatadogSpanId(score.spanId) },
|
|
371
|
+
{
|
|
372
|
+
label: score.scorerName ?? score.scorerId,
|
|
373
|
+
value: score.score,
|
|
374
|
+
metricType: "score",
|
|
375
|
+
mlApp: this.config.mlApp,
|
|
376
|
+
timestampMs: score.timestamp instanceof Date ? score.timestamp.getTime() : Date.now(),
|
|
377
|
+
...score.reason ? { reasoning: score.reason } : {},
|
|
378
|
+
...score.metadata ? { metadata: score.metadata } : {}
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
} catch (error) {
|
|
382
|
+
this.logger.error("Datadog bridge: Failed to submit evaluation", {
|
|
383
|
+
error,
|
|
384
|
+
traceId: score.traceId,
|
|
385
|
+
spanId: score.spanId,
|
|
386
|
+
scorerId: score.scorerId
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
352
390
|
executeWithSpanContext(spanId, fn) {
|
|
353
391
|
const ddSpan = this.ddSpanMap.get(spanId);
|
|
354
392
|
if (ddSpan) {
|
|
@@ -520,7 +558,7 @@ var DatadogBridge = class extends observability.BaseExporter {
|
|
|
520
558
|
annotations.metrics = metrics;
|
|
521
559
|
}
|
|
522
560
|
}
|
|
523
|
-
const knownFields = ["usage", "model", "provider"
|
|
561
|
+
const knownFields = ["usage", "model", "provider"];
|
|
524
562
|
const otherAttributes = utils.omitKeys(span.attributes ?? {}, knownFields);
|
|
525
563
|
const contextKeySet = new Set(this.config.requestContextKeys ?? []);
|
|
526
564
|
const flatContextTags = {};
|
|
@@ -652,6 +690,12 @@ function fillRandomBytes(bytes) {
|
|
|
652
690
|
bytes[i] = Math.floor(Math.random() * 256);
|
|
653
691
|
}
|
|
654
692
|
}
|
|
693
|
+
function toDatadogSpanId(spanId) {
|
|
694
|
+
if (/^[0-9a-f]{16}$/i.test(spanId)) {
|
|
695
|
+
return BigInt(`0x${spanId}`).toString(10);
|
|
696
|
+
}
|
|
697
|
+
return spanId;
|
|
698
|
+
}
|
|
655
699
|
function generateSpanId() {
|
|
656
700
|
const bytes = new Uint8Array(8);
|
|
657
701
|
fillRandomBytes(bytes);
|
|
@@ -787,7 +831,7 @@ var DatadogExporter = class extends observability.BaseExporter {
|
|
|
787
831
|
annotations.metrics = metrics;
|
|
788
832
|
}
|
|
789
833
|
}
|
|
790
|
-
const knownFields = ["usage", "model", "provider"
|
|
834
|
+
const knownFields = ["usage", "model", "provider"];
|
|
791
835
|
const otherAttributes = utils.omitKeys(span.attributes ?? {}, knownFields);
|
|
792
836
|
const contextKeySet = new Set(this.config.requestContextKeys ?? []);
|
|
793
837
|
const flatContextTags = {};
|