@mastra/datadog 1.2.3-alpha.1 → 1.2.4-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @mastra/datadog
2
2
 
3
+ ## 1.2.4-alpha.0
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 [[`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)]:
16
+ - @mastra/core@1.42.0-alpha.4
17
+
18
+ ## 1.2.3
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [[`fa63872`](https://github.com/mastra-ai/mastra/commit/fa6387280954e6b667bec5714b55ba082bc627ff), [`d779de3`](https://github.com/mastra-ai/mastra/commit/d779de3cd9d2e7ed8110547190e2f15e786a0e41), [`1750c97`](https://github.com/mastra-ai/mastra/commit/1750c975d6179fbf6db2813b15229d4f8f23fc55), [`9283971`](https://github.com/mastra-ai/mastra/commit/928397157009b4aef4d5fdf3a0a273cb371beb55), [`f07b646`](https://github.com/mastra-ai/mastra/commit/f07b64604ab7d25391179790b7fd4823df9e2dff), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`40f9297`](https://github.com/mastra-ai/mastra/commit/40f9297003b921c62373d3e8d3a4bda76c9f6de3), [`19a8658`](https://github.com/mastra-ai/mastra/commit/19a86589c788ef48bb6c1b0612cc82a201857379), [`850af77`](https://github.com/mastra-ai/mastra/commit/850af7779cb87c350804488734544a5b1843de25), [`82785f6`](https://github.com/mastra-ai/mastra/commit/82785f614bad7936ecbdcb526673f8da47779731), [`0f0d1ba`](https://github.com/mastra-ai/mastra/commit/0f0d1ba67bfcb2204e571401662f1eceefc03357), [`a18775a`](https://github.com/mastra-ai/mastra/commit/a18775a693172546ee2378d39b67d4e32895b251), [`1baf2d1`](https://github.com/mastra-ai/mastra/commit/1baf2d152c6881338ff8f114633d5316fe13dd15), [`8c31bcd`](https://github.com/mastra-ai/mastra/commit/8c31bcdb00e597880d5939b1b7d7566fbe5dacae), [`0e32507`](https://github.com/mastra-ai/mastra/commit/0e32507962cdfa5569b7bda5bc6fb3dd34e40b03), [`95b14cd`](https://github.com/mastra-ai/mastra/commit/95b14cdd820e86d97ac05fe568424c513a252e31), [`07c3de7`](https://github.com/mastra-ai/mastra/commit/07c3de7f7bc418beccaea3b5e6b7f7cdda79d492), [`0bf2d93`](https://github.com/mastra-ai/mastra/commit/0bf2d932d20e2936f2d9abb8c0a86e24fbc97ec6), [`7b0d34c`](https://github.com/mastra-ai/mastra/commit/7b0d34cfe4a2fce22ac86ae17404685ff67a2ddb), [`cb137cd`](https://github.com/mastra-ai/mastra/commit/cb137cdeed7c15ea4e8061f79d1d55d2ecea74d7), [`a659a77`](https://github.com/mastra-ai/mastra/commit/a659a779bdebe3a52a518c56d2260592d0240fe0), [`aa36be2`](https://github.com/mastra-ai/mastra/commit/aa36be23aa513b7dc53cb8ca16b7fab8f20e43ad), [`3332be9`](https://github.com/mastra-ai/mastra/commit/3332be9701ecd77aba840959d9a1d1ce7aef02d3), [`212c635`](https://github.com/mastra-ai/mastra/commit/212c635203e61d036ab41db8ff86c3893dc795b3), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`9aa5a73`](https://github.com/mastra-ai/mastra/commit/9aa5a73e7e110f6e9365eec69364a33d5f03bb56), [`f73c789`](https://github.com/mastra-ai/mastra/commit/f73c789e8ef21561580395d2c410119cab5848c8), [`8bd16da`](https://github.com/mastra-ai/mastra/commit/8bd16da73a4cb874d739373643dbd6a6e7f88684), [`c8630f8`](https://github.com/mastra-ai/mastra/commit/c8630f80d4f40cb5d22e60ab162b618b1907167a), [`94dfef6`](https://github.com/mastra-ai/mastra/commit/94dfef6e2bf19a88467ea3940afcbce88a433f0f), [`47f71dc`](https://github.com/mastra-ai/mastra/commit/47f71dc6fbcbd12d71e21a979e676e20a02bd77d), [`50ceae2`](https://github.com/mastra-ai/mastra/commit/50ceae270878e2f8fb2b2c6c2faab09df0007c8a), [`a122f79`](https://github.com/mastra-ai/mastra/commit/a122f79427ae225ec79c7b2ed46278da48d04b17), [`8cdde58`](https://github.com/mastra-ai/mastra/commit/8cdde5875bbba6702d9df226f2b20232b8d75d6c), [`3a081c1`](https://github.com/mastra-ai/mastra/commit/3a081c1255c5ae8c99f6dad91cc612934ef6f2bd), [`49f8abc`](https://github.com/mastra-ai/mastra/commit/49f8abce8258e4f2f87bd326acfbdb641264a47c), [`847ff1e`](https://github.com/mastra-ai/mastra/commit/847ff1e0d94368d94b2e173e4e0908e115568ef3), [`0c1ed1d`](https://github.com/mastra-ai/mastra/commit/0c1ed1d00c7d87b5ac99ca95896211a2fa9189fa), [`259d409`](https://github.com/mastra-ai/mastra/commit/259d409a514174299dbde1ff5e1121209b3ba850), [`9e16c68`](https://github.com/mastra-ai/mastra/commit/9e16c6818b6485ccb43df28aba6f3a2219d28662), [`cefca33`](https://github.com/mastra-ai/mastra/commit/cefca33ae666e69810c935fedf95a929c173d1d7), [`d00e8c5`](https://github.com/mastra-ai/mastra/commit/d00e8c50daebe5bce5bf2f48bde39c86fc3d2fe4), [`36fa7e2`](https://github.com/mastra-ai/mastra/commit/36fa7e24d14e58a1eb46147097b32f583e5b8775), [`87e9774`](https://github.com/mastra-ai/mastra/commit/87e97741c1e493cd6d62f478eb810b49bda4d57c), [`65a72e7`](https://github.com/mastra-ai/mastra/commit/65a72e70c25eedea8ff985a6624b96be2850236b), [`fe9eacd`](https://github.com/mastra-ai/mastra/commit/fe9eacd9545a0a9d64aad31c9fa90294a425289e), [`4c02027`](https://github.com/mastra-ai/mastra/commit/4c020277235eaa6b1dc957c90ad0639eef213992), [`0f77241`](https://github.com/mastra-ai/mastra/commit/0f7724108806703799a8ba80ad0f09414afd5066), [`e36253f`](https://github.com/mastra-ai/mastra/commit/e36253f0cbe1900f84e6eeaa3e0343d66ec1fce3), [`849efb9`](https://github.com/mastra-ai/mastra/commit/849efb9fca6dc976589c1f90a303fea618769109), [`92ff509`](https://github.com/mastra-ai/mastra/commit/92ff5098ef8a990438ca038077021a5f7541ec1d), [`3fce5e7`](https://github.com/mastra-ai/mastra/commit/3fce5e70d011d289043e75003ef3336ed4aa43c3), [`a763592`](https://github.com/mastra-ai/mastra/commit/a763592c3db46963ef1011cfe16fe372816e775e), [`db79c86`](https://github.com/mastra-ai/mastra/commit/db79c86c60723d57e02f9636ca2611bd4515f194), [`6855012`](https://github.com/mastra-ai/mastra/commit/685501247cc4717506f3e89beed03509d63a5370), [`80c7737`](https://github.com/mastra-ai/mastra/commit/80c7737e32d7917b5f356957d67c169d01744fd3), [`7fef31c`](https://github.com/mastra-ai/mastra/commit/7fef31c0d2a6d362a43a647a8a4f6ab893758a23), [`7fef31c`](https://github.com/mastra-ai/mastra/commit/7fef31c0d2a6d362a43a647a8a4f6ab893758a23), [`3f1cf47`](https://github.com/mastra-ai/mastra/commit/3f1cf476f74c1e4cc2df908837e05853a5347e31)]:
23
+ - @mastra/core@1.38.0
24
+ - @mastra/observability@1.14.1
25
+
3
26
  ## 1.2.3-alpha.1
4
27
 
5
28
  ### 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.
@@ -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;IAE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AEG;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 = { ...config, mlApp, site, apiKey, agentless, env };
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", "parameters"];
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", "parameters"];
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 = {};