@mastra/observability 0.0.0-studio-deploy-20260404184540 → 0.0.0-studio-cli-20260504022012

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,11 +1,716 @@
1
1
  # @mastra/observability
2
2
 
3
- ## 0.0.0-studio-deploy-20260404184540
3
+ ## 0.0.0-studio-cli-20260504022012
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`e133cc7`](https://github.com/mastra-ai/mastra/commit/e133cc73c2a73d90a39ad73f724e9cb492466b41), [`c55b527`](https://github.com/mastra-ai/mastra/commit/c55b52758a31368b2077b0dbbc3badfe4063f560), [`e133cc7`](https://github.com/mastra-ai/mastra/commit/e133cc73c2a73d90a39ad73f724e9cb492466b41), [`e133cc7`](https://github.com/mastra-ai/mastra/commit/e133cc73c2a73d90a39ad73f724e9cb492466b41), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a)]:
8
- - @mastra/core@0.0.0-studio-deploy-20260404184540
7
+ - Fixed model step traces to show the final prompt sent to the model, including memory-injected system messages. ([#16029](https://github.com/mastra-ai/mastra/pull/16029))
8
+
9
+ - Added a new `DatadogBridge` integration for Mastra tracing so Datadog can keep auto-instrumented HTTP, database, and framework spans nested under the agent, workflow, model, and tool spans that triggered them. ([#15716](https://github.com/mastra-ai/mastra/pull/15716))
10
+
11
+ ```typescript
12
+ import tracer from 'dd-trace';
13
+
14
+ tracer.init({
15
+ service: process.env.DD_SERVICE || 'my-mastra-app',
16
+ env: process.env.DD_ENV || 'production',
17
+ });
18
+
19
+ import { Mastra } from '@mastra/core';
20
+ import { Observability } from '@mastra/observability';
21
+ import { DatadogBridge } from '@mastra/datadog';
22
+
23
+ const mastra = new Mastra({
24
+ observability: new Observability({
25
+ configs: {
26
+ default: {
27
+ serviceName: 'my-mastra-app',
28
+ bridge: new DatadogBridge({
29
+ mlApp: process.env.DD_LLMOBS_ML_APP!,
30
+ }),
31
+ },
32
+ },
33
+ }),
34
+ });
35
+ ```
36
+
37
+ - Reduced startup noise: CloudExporter missing-token message is now logged at debug level instead of warn, since being disabled is the expected state for local development ([#16070](https://github.com/mastra-ai/mastra/pull/16070))
38
+
39
+ - Updated dependencies [[`6dcd65f`](https://github.com/mastra-ai/mastra/commit/6dcd65f2a34069e6dc43ba35f1d11119b9b40bef), [`c05c9a1`](https://github.com/mastra-ai/mastra/commit/c05c9a13230988cef6d438a62f37760f31927bc7), [`e24aacb`](https://github.com/mastra-ai/mastra/commit/e24aacba07bd66f5d95b636dc24016fca26b52cf), [`1c2dda8`](https://github.com/mastra-ai/mastra/commit/1c2dda805fbfccc0abf55d4cb20cc34402dc3f0c), [`c721164`](https://github.com/mastra-ai/mastra/commit/c7211643f7ac861f83b19a3757cc921487fc9d75), [`1b55954`](https://github.com/mastra-ai/mastra/commit/1b559541c1e08a10e49d01ffc51a634dfc37a286), [`5adc55e`](https://github.com/mastra-ai/mastra/commit/5adc55e63407be8ee977914957d68bcc2a075ceb), [`70017d7`](https://github.com/mastra-ai/mastra/commit/70017d72ab741b5d7040e2a15c251a317782e39e), [`e4942bc`](https://github.com/mastra-ai/mastra/commit/e4942bc7fdc903572f7d84f26d5e15f9d39c763d)]:
40
+ - @mastra/core@0.0.0-studio-cli-20260504022012
41
+
42
+ ## 1.11.1-alpha.1
43
+
44
+ ### Patch Changes
45
+
46
+ - Reduced startup noise: CloudExporter missing-token message is now logged at debug level instead of warn, since being disabled is the expected state for local development ([#16070](https://github.com/mastra-ai/mastra/pull/16070))
47
+
48
+ - Updated dependencies [[`c05c9a1`](https://github.com/mastra-ai/mastra/commit/c05c9a13230988cef6d438a62f37760f31927bc7), [`e24aacb`](https://github.com/mastra-ai/mastra/commit/e24aacba07bd66f5d95b636dc24016fca26b52cf), [`c721164`](https://github.com/mastra-ai/mastra/commit/c7211643f7ac861f83b19a3757cc921487fc9d75), [`1b55954`](https://github.com/mastra-ai/mastra/commit/1b559541c1e08a10e49d01ffc51a634dfc37a286), [`5adc55e`](https://github.com/mastra-ai/mastra/commit/5adc55e63407be8ee977914957d68bcc2a075ceb), [`70017d7`](https://github.com/mastra-ai/mastra/commit/70017d72ab741b5d7040e2a15c251a317782e39e), [`e4942bc`](https://github.com/mastra-ai/mastra/commit/e4942bc7fdc903572f7d84f26d5e15f9d39c763d)]:
49
+ - @mastra/core@1.32.0-alpha.1
50
+
51
+ ## 1.11.1-alpha.0
52
+
53
+ ### Patch Changes
54
+
55
+ - Fixed model step traces to show the final prompt sent to the model, including memory-injected system messages. ([#16029](https://github.com/mastra-ai/mastra/pull/16029))
56
+
57
+ - Added a new `DatadogBridge` integration for Mastra tracing so Datadog can keep auto-instrumented HTTP, database, and framework spans nested under the agent, workflow, model, and tool spans that triggered them. ([#15716](https://github.com/mastra-ai/mastra/pull/15716))
58
+
59
+ ```typescript
60
+ import tracer from 'dd-trace';
61
+
62
+ tracer.init({
63
+ service: process.env.DD_SERVICE || 'my-mastra-app',
64
+ env: process.env.DD_ENV || 'production',
65
+ });
66
+
67
+ import { Mastra } from '@mastra/core';
68
+ import { Observability } from '@mastra/observability';
69
+ import { DatadogBridge } from '@mastra/datadog';
70
+
71
+ const mastra = new Mastra({
72
+ observability: new Observability({
73
+ configs: {
74
+ default: {
75
+ serviceName: 'my-mastra-app',
76
+ bridge: new DatadogBridge({
77
+ mlApp: process.env.DD_LLMOBS_ML_APP!,
78
+ }),
79
+ },
80
+ },
81
+ }),
82
+ });
83
+ ```
84
+
85
+ - Updated dependencies [[`6dcd65f`](https://github.com/mastra-ai/mastra/commit/6dcd65f2a34069e6dc43ba35f1d11119b9b40bef), [`1c2dda8`](https://github.com/mastra-ai/mastra/commit/1c2dda805fbfccc0abf55d4cb20cc34402dc3f0c)]:
86
+ - @mastra/core@1.31.1-alpha.0
87
+
88
+ ## 1.11.0
89
+
90
+ ### Minor Changes
91
+
92
+ - Auto-attach the Mastra-level `environment` to all observability signals. ([#15956](https://github.com/mastra-ai/mastra/pull/15956))
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724), [`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7), [`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29), [`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79), [`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71), [`2b0f355`](https://github.com/mastra-ai/mastra/commit/2b0f3553be3e9e5524da539a66e5cf82668440a4), [`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682), [`b2deb29`](https://github.com/mastra-ai/mastra/commit/b2deb29412b300c868655b5840463614fbb7962d), [`66644be`](https://github.com/mastra-ai/mastra/commit/66644beac1aa560f0e417956ff007c89341dc382), [`e109607`](https://github.com/mastra-ai/mastra/commit/e10960749251e34d46b480a20648c490fd30381b), [`310b953`](https://github.com/mastra-ai/mastra/commit/310b95345f302dcd5ba3ed862bdc96f059d44122), [`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde), [`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2), [`8091c7c`](https://github.com/mastra-ai/mastra/commit/8091c7c944d15e13fef6d61b6cfd903f158d4006), [`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff), [`43f0e1d`](https://github.com/mastra-ai/mastra/commit/43f0e1d5d5a74ba6fc746f2ad89ebe0c64777a7d), [`da0b9e2`](https://github.com/mastra-ai/mastra/commit/da0b9e2ba7ecc560213b426d6c097fe63946086e), [`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28), [`04151c7`](https://github.com/mastra-ai/mastra/commit/04151c7dcea934b4fe9076708a23fac161195414), [`8091c7c`](https://github.com/mastra-ai/mastra/commit/8091c7c944d15e13fef6d61b6cfd903f158d4006)]:
97
+ - @mastra/core@1.31.0
98
+
99
+ ## 1.11.0-alpha.0
100
+
101
+ ### Minor Changes
102
+
103
+ - Auto-attach the Mastra-level `environment` to all observability signals. ([#15956](https://github.com/mastra-ai/mastra/pull/15956))
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724), [`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7), [`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29), [`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79), [`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71), [`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682), [`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde), [`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2), [`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff), [`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
108
+ - @mastra/core@1.31.0-alpha.0
109
+
110
+ ## 1.10.3
111
+
112
+ ### Patch Changes
113
+
114
+ - Add durable agents with resumable streams ([#12557](https://github.com/mastra-ai/mastra/pull/12557))
115
+
116
+ Durable agents make agent execution resilient to disconnections, crashes, and long-running operations.
117
+
118
+ ### The Problem
119
+
120
+ Standard agent streaming has two fragility points:
121
+ 1. **Connection drops** - If a client disconnects mid-stream (network blip, browser refresh, mobile app backgrounded), all subsequent events are lost. The client has no way to "catch up" on what they missed.
122
+ 2. **Long-running operations** - Agent loops with tool calls can take minutes. Holding an HTTP connection open that long is unreliable. If the server restarts or the connection times out, the work is lost.
123
+
124
+ ### The Solution
125
+
126
+ **Resumable streams** solve connection drops. Every event is cached with a sequential index. If a client disconnects at event 5, they can reconnect and request events starting from index 6. They receive cached events immediately, then continue with live events as they arrive.
127
+
128
+ **Durable execution** solves long-running operations. Instead of executing the agent loop directly in the HTTP request, execution happens in a workflow engine (built-in evented engine or Inngest). The HTTP request just subscribes to events. If the connection drops, execution continues. The client can reconnect anytime to observe progress.
129
+
130
+ ### Usage
131
+
132
+ Wrap any existing `Agent` with durability using factory functions:
133
+
134
+ ```typescript
135
+ import { Agent } from '@mastra/core/agent';
136
+ import { createDurableAgent } from '@mastra/core/agent/durable';
137
+
138
+ const agent = new Agent({
139
+ id: 'my-agent',
140
+ model: openai('gpt-4'),
141
+ instructions: 'You are helpful',
142
+ });
143
+
144
+ const durableAgent = createDurableAgent({ agent });
145
+ ```
146
+
147
+ **Factory functions for different execution strategies:**
148
+
149
+ | Factory | Execution | Use Case |
150
+ | ---------------------------------------- | ----------------------------------- | ------------------------------- |
151
+ | `createDurableAgent({ agent })` | Local, synchronous | Development, simple deployments |
152
+ | `createEventedAgent({ agent })` | Fire-and-forget via workflow engine | Long-running operations |
153
+ | `createInngestAgent({ agent, inngest })` | Inngest-powered | Production, distributed systems |
154
+
155
+ ### Resumable Streams
156
+
157
+ ```typescript
158
+ // Start streaming
159
+ const { runId, output } = await durableAgent.stream('Analyze this data...');
160
+
161
+ // Client disconnects at event 5...
162
+
163
+ // Reconnect and resume from where we left off
164
+ const { output: resumed } = await durableAgent.observe(runId, { offset: 6 });
165
+ // Receives events 6, 7, 8... from cache, then continues with live events
166
+ ```
167
+
168
+ ### PubSub and Cache
169
+
170
+ Durable agents use two infrastructure components:
171
+
172
+ | Component | Purpose | Default |
173
+ | ---------- | ----------------------------------------- | --------------------- |
174
+ | **PubSub** | Real-time event delivery during streaming | `EventEmitterPubSub` |
175
+ | **Cache** | Stores events for replay on reconnection | `InMemoryServerCache` |
176
+
177
+ When `stream()` is called, events flow through pubsub in real-time. The cache stores each event with a sequential index. When `observe()` is called, missed events replay from cache before continuing with live events.
178
+
179
+ **Configure via Mastra instance (recommended):**
180
+
181
+ ```typescript
182
+ const mastra = new Mastra({
183
+ cache: new RedisServerCache({ url: 'redis://...' }),
184
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
185
+ agents: {
186
+ // Inherits cache and pubsub from Mastra
187
+ myAgent: createDurableAgent({ agent }),
188
+ },
189
+ });
190
+ ```
191
+
192
+ **Configure per-agent (overrides Mastra):**
193
+
194
+ ```typescript
195
+ const durableAgent = createDurableAgent({
196
+ agent,
197
+ cache: new RedisServerCache({ url: 'redis://...' }),
198
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
199
+ });
200
+ ```
201
+
202
+ **Disable caching (streams won't be resumable):**
203
+
204
+ ```typescript
205
+ const durableAgent = createDurableAgent({ agent, cache: false });
206
+ ```
207
+
208
+ For single-instance deployments, the defaults work fine. For multi-instance deployments (load balancer, horizontal scaling), use Redis-backed implementations so any instance can serve reconnection requests.
209
+
210
+ ### Class Hierarchy
211
+ - `DurableAgent` extends `Agent` - base class with resumable streams
212
+ - `EventedAgent` extends `DurableAgent` - fire-and-forget execution
213
+ - `InngestAgent` extends `DurableAgent` - Inngest-powered execution
214
+
215
+ - Reduced default cloud observability volume by filtering model chunk spans from CloudExporter uploads by default and raising the default observability log level to `warn`. ([#15815](https://github.com/mastra-ai/mastra/pull/15815))
216
+
217
+ - Updated dependencies [[`920c757`](https://github.com/mastra-ai/mastra/commit/920c75799c6bd71787d86deaf654a35af4c839ca), [`d587199`](https://github.com/mastra-ai/mastra/commit/d5871993c0371bde2b0717d6b47194755baa1443), [`1fe2533`](https://github.com/mastra-ai/mastra/commit/1fe2533c4382ca6858aac7c4b63e888c2eac6541), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8)]:
218
+ - @mastra/core@1.30.0
219
+
220
+ ## 1.10.3-alpha.0
221
+
222
+ ### Patch Changes
223
+
224
+ - Add durable agents with resumable streams ([#12557](https://github.com/mastra-ai/mastra/pull/12557))
225
+
226
+ Durable agents make agent execution resilient to disconnections, crashes, and long-running operations.
227
+
228
+ ### The Problem
229
+
230
+ Standard agent streaming has two fragility points:
231
+ 1. **Connection drops** - If a client disconnects mid-stream (network blip, browser refresh, mobile app backgrounded), all subsequent events are lost. The client has no way to "catch up" on what they missed.
232
+ 2. **Long-running operations** - Agent loops with tool calls can take minutes. Holding an HTTP connection open that long is unreliable. If the server restarts or the connection times out, the work is lost.
233
+
234
+ ### The Solution
235
+
236
+ **Resumable streams** solve connection drops. Every event is cached with a sequential index. If a client disconnects at event 5, they can reconnect and request events starting from index 6. They receive cached events immediately, then continue with live events as they arrive.
237
+
238
+ **Durable execution** solves long-running operations. Instead of executing the agent loop directly in the HTTP request, execution happens in a workflow engine (built-in evented engine or Inngest). The HTTP request just subscribes to events. If the connection drops, execution continues. The client can reconnect anytime to observe progress.
239
+
240
+ ### Usage
241
+
242
+ Wrap any existing `Agent` with durability using factory functions:
243
+
244
+ ```typescript
245
+ import { Agent } from '@mastra/core/agent';
246
+ import { createDurableAgent } from '@mastra/core/agent/durable';
247
+
248
+ const agent = new Agent({
249
+ id: 'my-agent',
250
+ model: openai('gpt-4'),
251
+ instructions: 'You are helpful',
252
+ });
253
+
254
+ const durableAgent = createDurableAgent({ agent });
255
+ ```
256
+
257
+ **Factory functions for different execution strategies:**
258
+
259
+ | Factory | Execution | Use Case |
260
+ | ---------------------------------------- | ----------------------------------- | ------------------------------- |
261
+ | `createDurableAgent({ agent })` | Local, synchronous | Development, simple deployments |
262
+ | `createEventedAgent({ agent })` | Fire-and-forget via workflow engine | Long-running operations |
263
+ | `createInngestAgent({ agent, inngest })` | Inngest-powered | Production, distributed systems |
264
+
265
+ ### Resumable Streams
266
+
267
+ ```typescript
268
+ // Start streaming
269
+ const { runId, output } = await durableAgent.stream('Analyze this data...');
270
+
271
+ // Client disconnects at event 5...
272
+
273
+ // Reconnect and resume from where we left off
274
+ const { output: resumed } = await durableAgent.observe(runId, { offset: 6 });
275
+ // Receives events 6, 7, 8... from cache, then continues with live events
276
+ ```
277
+
278
+ ### PubSub and Cache
279
+
280
+ Durable agents use two infrastructure components:
281
+
282
+ | Component | Purpose | Default |
283
+ | ---------- | ----------------------------------------- | --------------------- |
284
+ | **PubSub** | Real-time event delivery during streaming | `EventEmitterPubSub` |
285
+ | **Cache** | Stores events for replay on reconnection | `InMemoryServerCache` |
286
+
287
+ When `stream()` is called, events flow through pubsub in real-time. The cache stores each event with a sequential index. When `observe()` is called, missed events replay from cache before continuing with live events.
288
+
289
+ **Configure via Mastra instance (recommended):**
290
+
291
+ ```typescript
292
+ const mastra = new Mastra({
293
+ cache: new RedisServerCache({ url: 'redis://...' }),
294
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
295
+ agents: {
296
+ // Inherits cache and pubsub from Mastra
297
+ myAgent: createDurableAgent({ agent }),
298
+ },
299
+ });
300
+ ```
301
+
302
+ **Configure per-agent (overrides Mastra):**
303
+
304
+ ```typescript
305
+ const durableAgent = createDurableAgent({
306
+ agent,
307
+ cache: new RedisServerCache({ url: 'redis://...' }),
308
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
309
+ });
310
+ ```
311
+
312
+ **Disable caching (streams won't be resumable):**
313
+
314
+ ```typescript
315
+ const durableAgent = createDurableAgent({ agent, cache: false });
316
+ ```
317
+
318
+ For single-instance deployments, the defaults work fine. For multi-instance deployments (load balancer, horizontal scaling), use Redis-backed implementations so any instance can serve reconnection requests.
319
+
320
+ ### Class Hierarchy
321
+ - `DurableAgent` extends `Agent` - base class with resumable streams
322
+ - `EventedAgent` extends `DurableAgent` - fire-and-forget execution
323
+ - `InngestAgent` extends `DurableAgent` - Inngest-powered execution
324
+
325
+ - Reduced default cloud observability volume by filtering model chunk spans from CloudExporter uploads by default and raising the default observability log level to `warn`. ([#15815](https://github.com/mastra-ai/mastra/pull/15815))
326
+
327
+ - Updated dependencies [[`920c757`](https://github.com/mastra-ai/mastra/commit/920c75799c6bd71787d86deaf654a35af4c839ca), [`1fe2533`](https://github.com/mastra-ai/mastra/commit/1fe2533c4382ca6858aac7c4b63e888c2eac6541), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8)]:
328
+ - @mastra/core@1.30.0-alpha.1
329
+
330
+ ## 1.10.2
331
+
332
+ ### Patch Changes
333
+
334
+ - Fixed `inputDetails.cacheWrite` reflecting only the final step's cache-write tokens in multi-step Anthropic prompt-caching runs (e.g. subagent and workflow flows). Trace `inputDetails.cacheWrite` and the derived input-token totals now reflect the full multi-step run, so cost accounting in Langfuse and other exporters matches what Anthropic actually charged. ([#15828](https://github.com/mastra-ai/mastra/pull/15828))
335
+
336
+ - Updated dependencies [[`6db978c`](https://github.com/mastra-ai/mastra/commit/6db978c42e94e75540a504f7230086f0b5cd35f9), [`512a013`](https://github.com/mastra-ai/mastra/commit/512a013f285aa9c0aa8f08a35b2ce09f9938b017), [`e9becde`](https://github.com/mastra-ai/mastra/commit/e9becdeed9176b9f8392e557bde12b933f99cf7a), [`703a443`](https://github.com/mastra-ai/mastra/commit/703a44390c587d9c0b8ae94ec4edd8afb2a74044), [`808df1b`](https://github.com/mastra-ai/mastra/commit/808df1b39358b5f10b7317107e42b1fda7c87185)]:
337
+ - @mastra/core@1.29.1
338
+
339
+ ## 1.10.2-alpha.0
340
+
341
+ ### Patch Changes
342
+
343
+ - Fixed `inputDetails.cacheWrite` reflecting only the final step's cache-write tokens in multi-step Anthropic prompt-caching runs (e.g. subagent and workflow flows). Trace `inputDetails.cacheWrite` and the derived input-token totals now reflect the full multi-step run, so cost accounting in Langfuse and other exporters matches what Anthropic actually charged. ([#15828](https://github.com/mastra-ai/mastra/pull/15828))
344
+
345
+ - Updated dependencies [[`703a443`](https://github.com/mastra-ai/mastra/commit/703a44390c587d9c0b8ae94ec4edd8afb2a74044), [`808df1b`](https://github.com/mastra-ai/mastra/commit/808df1b39358b5f10b7317107e42b1fda7c87185)]:
346
+ - @mastra/core@1.29.1-alpha.1
347
+
348
+ ## 1.10.1
349
+
350
+ ### Patch Changes
351
+
352
+ - Fixed requestContext filtering in span creation to prevent large objects from being serialized into trace data. ([#15642](https://github.com/mastra-ai/mastra/pull/15642))
353
+
354
+ - Updated dependencies [[`28caa5b`](https://github.com/mastra-ai/mastra/commit/28caa5b032358545af2589ed90636eccb4dd9d2f), [`c1ae974`](https://github.com/mastra-ai/mastra/commit/c1ae97491f6e57378ce880c3a397778c42adcdf1), [`b510d36`](https://github.com/mastra-ai/mastra/commit/b510d368f73dab6be2e2c2bc99035aaef1fb7d7a), [`13b4d7c`](https://github.com/mastra-ai/mastra/commit/13b4d7c16de34dff9095d1cd80f22f544b6cfe75), [`7a7b313`](https://github.com/mastra-ai/mastra/commit/7a7b3138fb3bcf0b0c740eaea07971e43d330ef3), [`c04417b`](https://github.com/mastra-ai/mastra/commit/c04417ba0a2e4ded66da4352331ef29cd4bd1d79), [`cf25a03`](https://github.com/mastra-ai/mastra/commit/cf25a03132164b9dc1e5dccf7394824e33007c51), [`8a71261`](https://github.com/mastra-ai/mastra/commit/8a71261e3954ae617c6f8e25767b951f99438ab2), [`9e973b0`](https://github.com/mastra-ai/mastra/commit/9e973b010dacfa15ac82b0072897319f5234b90a), [`dd934a0`](https://github.com/mastra-ai/mastra/commit/dd934a0982ce0f78712fbd559e4f2410bf594b39), [`ba6b0c5`](https://github.com/mastra-ai/mastra/commit/ba6b0c51bfce358554fd33c7f2bcd5593633f2ff), [`a6dac0a`](https://github.com/mastra-ai/mastra/commit/a6dac0a40c7181161b1add4e8534f962bcbc9aa7), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`6c8c6c7`](https://github.com/mastra-ai/mastra/commit/6c8c6c71518394321a4692614aa4b11f3bb0a343), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`7d056b6`](https://github.com/mastra-ai/mastra/commit/7d056b6ecf603cacaa0f663ff1df025ed885b6c1), [`9cef83b`](https://github.com/mastra-ai/mastra/commit/9cef83b8a642b8098747772921e3523b492bafbc), [`d30e215`](https://github.com/mastra-ai/mastra/commit/d30e2156c746bc9fd791745cec1cc24377b66789), [`021a60f`](https://github.com/mastra-ai/mastra/commit/021a60f1f3e0135a70ef23c58be7a9b3aaffe6b4), [`73f2809`](https://github.com/mastra-ai/mastra/commit/73f2809721db24e98cdf122539652a455211b450), [`aedeea4`](https://github.com/mastra-ai/mastra/commit/aedeea48a94f728323f040478775076b9574be50), [`26f1f94`](https://github.com/mastra-ai/mastra/commit/26f1f9490574b864ba1ecedf2c9632e0767a23bd), [`8126d86`](https://github.com/mastra-ai/mastra/commit/8126d8638411eacfafdc29036ac998e8757ea66f), [`73b45fa`](https://github.com/mastra-ai/mastra/commit/73b45facdef4fbcb8af710c50f0646f18619dbaa), [`ae97520`](https://github.com/mastra-ai/mastra/commit/ae975206fdb0f6ef03c4d5bf94f7dc7c3f706c02), [`7a7b313`](https://github.com/mastra-ai/mastra/commit/7a7b3138fb3bcf0b0c740eaea07971e43d330ef3), [`441670a`](https://github.com/mastra-ai/mastra/commit/441670a02c9dc7731c52674f55481e7848a84523)]:
355
+ - @mastra/core@1.29.0
356
+
357
+ ## 1.10.1-alpha.0
358
+
359
+ ### Patch Changes
360
+
361
+ - Fixed requestContext filtering in span creation to prevent large objects from being serialized into trace data. ([#15642](https://github.com/mastra-ai/mastra/pull/15642))
362
+
363
+ - Updated dependencies [[`c04417b`](https://github.com/mastra-ai/mastra/commit/c04417ba0a2e4ded66da4352331ef29cd4bd1d79), [`cf25a03`](https://github.com/mastra-ai/mastra/commit/cf25a03132164b9dc1e5dccf7394824e33007c51), [`ba6b0c5`](https://github.com/mastra-ai/mastra/commit/ba6b0c51bfce358554fd33c7f2bcd5593633f2ff)]:
364
+ - @mastra/core@1.29.0-alpha.3
365
+
366
+ ## 1.10.0
367
+
368
+ ### Minor Changes
369
+
370
+ - Changed `MODEL_CHUNK` `tool-result` span `output` handling. ([#15495](https://github.com/mastra-ai/mastra/pull/15495))
371
+
372
+ **What changed**
373
+ - `MODEL_CHUNK` spans for `tool-result` now omit `output` for locally executed tools.
374
+ - `TOOL_CALL` remains the canonical span for locally executed tool result payloads.
375
+ - `MODEL_CHUNK` spans for provider-executed `tool-result` chunks still include `output`.
376
+ - `MODEL_CHUNK` metadata still includes `toolCallId`, `toolName`, and `providerExecuted`.
377
+
378
+ **Why**
379
+ This reduces duplicate tool result payloads in traces without dropping provider-emitted tool results that may not have a matching `TOOL_CALL` span.
380
+
381
+ - Added unique IDs (`logId`, `metricId`, `scoreId`, `feedbackId`) to all observability signals, generated automatically at emission time for de-duplication across the framework pipeline and cross-system correlation. User-facing APIs (`logger.info()`, `metrics.emit()`, `addScore()`, `addFeedback()`) are unchanged. ([#15242](https://github.com/mastra-ai/mastra/pull/15242))
382
+
383
+ For existing ClickHouse and DuckDB observability signal tables, run `npx mastra migrate` before initializing the store so the new signal-ID schema is applied.
384
+
385
+ ### Patch Changes
386
+
387
+ - Fixed span serialization replacing tool parameter JSON schemas with lossy summaries like `"unknown (required)"`. JSON schemas in span data are now preserved as-is, keeping full type information for debugging in observability tools like Datadog. Also fixed MODEL_STEP span input showing only a keys summary instead of actual messages for AI SDK v5 providers. ([#15404](https://github.com/mastra-ai/mastra/pull/15404))
388
+
389
+ - Fixed CloudExporter to default to observability.mastra.ai for Mastra platform exports. ([#15418](https://github.com/mastra-ai/mastra/pull/15418))
390
+
391
+ - Improved tracing overhead when filtering spans. Spans dropped by `excludeSpanTypes` or the internal-span filter (`includeInternalSpans: false`) now skip payload serialization and retention entirely instead of paying the cost and discarding at export time. ([#15487](https://github.com/mastra-ai/mastra/pull/15487))
392
+
393
+ - Updated dependencies [[`20f59b8`](https://github.com/mastra-ai/mastra/commit/20f59b876cf91199efbc49a0e36b391240708f08), [`aba393e`](https://github.com/mastra-ai/mastra/commit/aba393e2da7390c69b80e516a4f153cda6f09376), [`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`e2687a7`](https://github.com/mastra-ai/mastra/commit/e2687a7408790c384563816a9a28ed06735684c9), [`fdd54cf`](https://github.com/mastra-ai/mastra/commit/fdd54cf612a9af876e9fdd85e534454f6e7dd518), [`6315317`](https://github.com/mastra-ai/mastra/commit/63153175fe9a7b224e5be7c209bbebc01dd9b0d5), [`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`0474c2b`](https://github.com/mastra-ai/mastra/commit/0474c2b2e7c7e1ad8691dca031284841391ff1ef), [`0a5fa1d`](https://github.com/mastra-ai/mastra/commit/0a5fa1d3cb0583889d06687155f26fd7d2edc76c), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`ea43e64`](https://github.com/mastra-ai/mastra/commit/ea43e646dd95d507694b6112b0bf1df22ad552b2), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`30456b6`](https://github.com/mastra-ai/mastra/commit/30456b6b08c8fd17e109dd093b73d93b65e83bc5), [`9d11a8c`](https://github.com/mastra-ai/mastra/commit/9d11a8c1c8924eb975a245a5884d40ca1b7e0491), [`9d3b24b`](https://github.com/mastra-ai/mastra/commit/9d3b24b19407ae9c09586cf7766d38dc4dff4a69), [`00d1b16`](https://github.com/mastra-ai/mastra/commit/00d1b16b401199cb294fa23f43336547db4dca9b), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`62919a6`](https://github.com/mastra-ai/mastra/commit/62919a6ee0fbf3779ad21a97b1ec6696515d5104), [`d246696`](https://github.com/mastra-ai/mastra/commit/d246696139a3144a5b21b042d41c532688e957e1), [`354f9ce`](https://github.com/mastra-ai/mastra/commit/354f9ce1ca6af2074b6a196a23f8ec30012dccca), [`16e34ca`](https://github.com/mastra-ai/mastra/commit/16e34caa98b9a114b17a6125e4e3fd87f169d0d0), [`7020c06`](https://github.com/mastra-ai/mastra/commit/7020c0690b199d9da337f0e805f16948e557922e), [`8786a61`](https://github.com/mastra-ai/mastra/commit/8786a61fa54ba265f85eeff9985ca39863d18bb6), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`af8a57e`](https://github.com/mastra-ai/mastra/commit/af8a57ed9ba9685ad8601d5b71ae3706da6222f9), [`d63ffdb`](https://github.com/mastra-ai/mastra/commit/d63ffdbb2c11e76fe5ea45faab44bc15460f010c), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`1bd5104`](https://github.com/mastra-ai/mastra/commit/1bd51048b6da93507276d6623e3fd96a9e1a8944), [`e9837b5`](https://github.com/mastra-ai/mastra/commit/e9837b53699e18711b09e0ca010a4106376f2653), [`8f1b280`](https://github.com/mastra-ai/mastra/commit/8f1b280b7fe6999ec654f160cb69c1a8719e7a57), [`92dcf02`](https://github.com/mastra-ai/mastra/commit/92dcf029294210ac91b090900c1a0555a425c57a), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3), [`8fb2405`](https://github.com/mastra-ai/mastra/commit/8fb2405138f2d208b7962ad03f121ca25bcc28c5), [`12df98c`](https://github.com/mastra-ai/mastra/commit/12df98c4904643d9481f5c78f3bed443725b4c96)]:
394
+ - @mastra/core@1.26.0
395
+
396
+ ## 1.10.0-alpha.3
397
+
398
+ ### Minor Changes
399
+
400
+ - Added unique IDs (`logId`, `metricId`, `scoreId`, `feedbackId`) to all observability signals, generated automatically at emission time for de-duplication across the framework pipeline and cross-system correlation. User-facing APIs (`logger.info()`, `metrics.emit()`, `addScore()`, `addFeedback()`) are unchanged. ([#15242](https://github.com/mastra-ai/mastra/pull/15242))
401
+
402
+ For existing ClickHouse and DuckDB observability signal tables, run `npx mastra migrate` before initializing the store so the new signal-ID schema is applied.
403
+
404
+ ### Patch Changes
405
+
406
+ - Updated dependencies [[`20f59b8`](https://github.com/mastra-ai/mastra/commit/20f59b876cf91199efbc49a0e36b391240708f08), [`e2687a7`](https://github.com/mastra-ai/mastra/commit/e2687a7408790c384563816a9a28ed06735684c9), [`8f1b280`](https://github.com/mastra-ai/mastra/commit/8f1b280b7fe6999ec654f160cb69c1a8719e7a57), [`12df98c`](https://github.com/mastra-ai/mastra/commit/12df98c4904643d9481f5c78f3bed443725b4c96)]:
407
+ - @mastra/core@1.26.0-alpha.11
408
+
409
+ ## 1.10.0-alpha.2
410
+
411
+ ### Minor Changes
412
+
413
+ - Changed `MODEL_CHUNK` `tool-result` span `output` handling. ([#15495](https://github.com/mastra-ai/mastra/pull/15495))
414
+
415
+ **What changed**
416
+ - `MODEL_CHUNK` spans for `tool-result` now omit `output` for locally executed tools.
417
+ - `TOOL_CALL` remains the canonical span for locally executed tool result payloads.
418
+ - `MODEL_CHUNK` spans for provider-executed `tool-result` chunks still include `output`.
419
+ - `MODEL_CHUNK` metadata still includes `toolCallId`, `toolName`, and `providerExecuted`.
420
+
421
+ **Why**
422
+ This reduces duplicate tool result payloads in traces without dropping provider-emitted tool results that may not have a matching `TOOL_CALL` span.
423
+
424
+ ### Patch Changes
425
+
426
+ - Updated dependencies [[`8786a61`](https://github.com/mastra-ai/mastra/commit/8786a61fa54ba265f85eeff9985ca39863d18bb6), [`8fb2405`](https://github.com/mastra-ai/mastra/commit/8fb2405138f2d208b7962ad03f121ca25bcc28c5)]:
427
+ - @mastra/core@1.26.0-alpha.7
428
+
429
+ ## 1.9.2-alpha.1
430
+
431
+ ### Patch Changes
432
+
433
+ - Improved tracing overhead when filtering spans. Spans dropped by `excludeSpanTypes` or the internal-span filter (`includeInternalSpans: false`) now skip payload serialization and retention entirely instead of paying the cost and discarding at export time. ([#15487](https://github.com/mastra-ai/mastra/pull/15487))
434
+
435
+ - Updated dependencies [[`6315317`](https://github.com/mastra-ai/mastra/commit/63153175fe9a7b224e5be7c209bbebc01dd9b0d5), [`9d3b24b`](https://github.com/mastra-ai/mastra/commit/9d3b24b19407ae9c09586cf7766d38dc4dff4a69)]:
436
+ - @mastra/core@1.26.0-alpha.6
437
+
438
+ ## 1.9.2-alpha.0
439
+
440
+ ### Patch Changes
441
+
442
+ - Fixed span serialization replacing tool parameter JSON schemas with lossy summaries like `"unknown (required)"`. JSON schemas in span data are now preserved as-is, keeping full type information for debugging in observability tools like Datadog. Also fixed MODEL_STEP span input showing only a keys summary instead of actual messages for AI SDK v5 providers. ([#15404](https://github.com/mastra-ai/mastra/pull/15404))
443
+
444
+ - Fixed CloudExporter to default to observability.mastra.ai for Mastra platform exports. ([#15418](https://github.com/mastra-ai/mastra/pull/15418))
445
+
446
+ - Updated dependencies [[`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1)]:
447
+ - @mastra/core@1.26.0-alpha.2
448
+
449
+ ## 1.9.1
450
+
451
+ ### Patch Changes
452
+
453
+ - Fixed double-counting of Anthropic cache tokens in usage metrics ([#15316](https://github.com/mastra-ai/mastra/pull/15316))
454
+
455
+ - Cost estimates now use the latest model pricing rates for more accurate calculations ([#15362](https://github.com/mastra-ai/mastra/pull/15362))
456
+
457
+ - Update references to "Mastra Cloud" to "Mastra platform" ([#15297](https://github.com/mastra-ai/mastra/pull/15297))
458
+
459
+ - Reduced observability overhead for `MODEL_STEP` spans by storing a lightweight message preview of request bodies. ([#15249](https://github.com/mastra-ai/mastra/pull/15249))
460
+
461
+ This keeps span previews readable and avoids pulling large payloads into exporter input.
462
+
463
+ - Fixed cost lookup for models with date suffixes. Providers like OpenAI often return model names with date suffixes (e.g., `gpt-5.4-mini-2026-03-17`) that don't exactly match pricing data entries. The lookup now tries multiple variants including stripping date suffixes and converting dots to dashes. ([#15349](https://github.com/mastra-ai/mastra/pull/15349))
464
+
465
+ - Added `entityVersionId`, `parentEntityVersionId`, and `rootEntityVersionId` to span correlation context, enabling version information to propagate to scores, metrics, logs, and feedback emitted during traced execution. ([#15317](https://github.com/mastra-ai/mastra/pull/15317))
466
+
467
+ - Fixed stack traces for errors reported to Sentry. Exceptions now point to the code that threw the error instead of `SentryExporter.handleSpanEnded` inside the exporter, so issues in Sentry are actually debuggable. ([#15343](https://github.com/mastra-ai/mastra/pull/15343))
468
+
469
+ This was caused by two issues, both fixed:
470
+ - `@mastra/sentry` passed the error message as a string to `Sentry.captureException`, which made Sentry synthesize a stack trace from the exporter's call site. It now passes an `Error` instance with the captured stack attached.
471
+ - `@mastra/observability` stored the wrapping `MastraError`'s stack on the span, hiding the original error's location. When the `MastraError` has a cause, the cause's stack is now preserved.
472
+
473
+ Fixes [#15337](https://github.com/mastra-ai/mastra/issues/15337).
474
+
475
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`8fad147`](https://github.com/mastra-ai/mastra/commit/8fad14759804179c8e080ce4d9dec6ef1a808b31), [`582644c`](https://github.com/mastra-ai/mastra/commit/582644c4a87f83b4f245a84d72b9e8590585012e), [`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e), [`5d84914`](https://github.com/mastra-ai/mastra/commit/5d84914e0e520c642a40329b210b413fcd139898), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fd2f314`](https://github.com/mastra-ai/mastra/commit/fd2f31473d3449b6b97e837ef8641264377f41a7), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`e80fead`](https://github.com/mastra-ai/mastra/commit/e80fead1412cc0d1b2f7d6a1ce5017d9e0098ff7), [`0287b64`](https://github.com/mastra-ai/mastra/commit/0287b644a5c3272755cf3112e71338106664103b), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
476
+ - @mastra/core@1.25.0
477
+
478
+ ## 1.9.1-alpha.2
479
+
480
+ ### Patch Changes
481
+
482
+ - Cost estimates now use the latest model pricing rates for more accurate calculations ([#15362](https://github.com/mastra-ai/mastra/pull/15362))
483
+
484
+ - Reduced observability overhead for `MODEL_STEP` spans by storing a lightweight message preview of request bodies. ([#15249](https://github.com/mastra-ai/mastra/pull/15249))
485
+
486
+ This keeps span previews readable and avoids pulling large payloads into exporter input.
487
+
488
+ - Fixed cost lookup for models with date suffixes. Providers like OpenAI often return model names with date suffixes (e.g., `gpt-5.4-mini-2026-03-17`) that don't exactly match pricing data entries. The lookup now tries multiple variants including stripping date suffixes and converting dots to dashes. ([#15349](https://github.com/mastra-ai/mastra/pull/15349))
489
+
490
+ - Added `entityVersionId`, `parentEntityVersionId`, and `rootEntityVersionId` to span correlation context, enabling version information to propagate to scores, metrics, logs, and feedback emitted during traced execution. ([#15317](https://github.com/mastra-ai/mastra/pull/15317))
491
+
492
+ - Fixed stack traces for errors reported to Sentry. Exceptions now point to the code that threw the error instead of `SentryExporter.handleSpanEnded` inside the exporter, so issues in Sentry are actually debuggable. ([#15343](https://github.com/mastra-ai/mastra/pull/15343))
493
+
494
+ This was caused by two issues, both fixed:
495
+ - `@mastra/sentry` passed the error message as a string to `Sentry.captureException`, which made Sentry synthesize a stack trace from the exporter's call site. It now passes an `Error` instance with the captured stack attached.
496
+ - `@mastra/observability` stored the wrapping `MastraError`'s stack on the span, hiding the original error's location. When the `MastraError` has a cause, the cause's stack is now preserved.
497
+
498
+ Fixes [#15337](https://github.com/mastra-ai/mastra/issues/15337).
499
+
500
+ - Updated dependencies [[`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
501
+ - @mastra/core@1.25.0-alpha.3
502
+
503
+ ## 1.9.1-alpha.1
504
+
505
+ ### Patch Changes
506
+
507
+ - Fixed double-counting of Anthropic cache tokens in usage metrics ([#15316](https://github.com/mastra-ai/mastra/pull/15316))
508
+
509
+ ## 1.9.1-alpha.0
510
+
511
+ ### Patch Changes
512
+
513
+ - Update references to "Mastra Cloud" to "Mastra platform" ([#15297](https://github.com/mastra-ai/mastra/pull/15297))
514
+
515
+ - Updated dependencies [[`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e)]:
516
+ - @mastra/core@1.25.0-alpha.2
517
+
518
+ ## 1.9.0
519
+
520
+ ### Minor Changes
521
+
522
+ - Added support for project-scoped CloudExporter collector routes for organization API keys. ([#15189](https://github.com/mastra-ai/mastra/pull/15189))
523
+
524
+ **What changed**
525
+ CloudExporter now accepts a `projectId` option and reads `MASTRA_PROJECT_ID` so remote writes can target project-scoped collector URLs when you authenticate with an organization API key.
526
+
527
+ ```ts
528
+ new CloudExporter({
529
+ accessToken: process.env.MASTRA_CLOUD_ACCESS_TOKEN,
530
+ projectId: process.env.MASTRA_PROJECT_ID,
531
+ });
532
+ ```
533
+
534
+ When `projectId` is set, base endpoints resolve to `/projects/:projectId/ai/{signal}/publish`. Without it, existing JWT-style `/ai/{signal}/publish` routes still work as before.
535
+
536
+ ### Patch Changes
537
+
538
+ - Updated dependencies [[`ef94400`](https://github.com/mastra-ai/mastra/commit/ef9440049402596b31f2ab976c5e4508f6cb6c91), [`3db852b`](https://github.com/mastra-ai/mastra/commit/3db852bff74e29f60d415a7b0f1583d6ce2bad92)]:
539
+ - @mastra/core@1.24.1
540
+
541
+ ## 1.9.0-alpha.0
542
+
543
+ ### Minor Changes
544
+
545
+ - Added support for project-scoped CloudExporter collector routes for organization API keys. ([#15189](https://github.com/mastra-ai/mastra/pull/15189))
546
+
547
+ **What changed**
548
+ CloudExporter now accepts a `projectId` option and reads `MASTRA_PROJECT_ID` so remote writes can target project-scoped collector URLs when you authenticate with an organization API key.
549
+
550
+ ```ts
551
+ new CloudExporter({
552
+ accessToken: process.env.MASTRA_CLOUD_ACCESS_TOKEN,
553
+ projectId: process.env.MASTRA_PROJECT_ID,
554
+ });
555
+ ```
556
+
557
+ When `projectId` is set, base endpoints resolve to `/projects/:projectId/ai/{signal}/publish`. Without it, existing JWT-style `/ai/{signal}/publish` routes still work as before.
558
+
559
+ ### Patch Changes
560
+
561
+ - Updated dependencies [[`ef94400`](https://github.com/mastra-ai/mastra/commit/ef9440049402596b31f2ab976c5e4508f6cb6c91)]:
562
+ - @mastra/core@1.24.1-alpha.0
563
+
564
+ ## 1.8.0
565
+
566
+ ### Minor Changes
567
+
568
+ - Added CloudExporter support for Mastra Observability logs, metrics, scores, and feedback. ([#15124](https://github.com/mastra-ai/mastra/pull/15124))
569
+
570
+ CloudExporter now batches and uploads all Mastra Observability signals to Mastra Cloud, not just tracing spans.
571
+
572
+ This includes a breaking change to the CloudExporter endpoint format. We now pass a base endpoint URL and let let the exporter derive the standard publish paths automatically.
573
+
574
+ ```ts
575
+ import { CloudExporter, Observability } from '@mastra/observability';
576
+
577
+ const observability = new Observability({
578
+ configs: {
579
+ default: {
580
+ serviceName: 'my-app',
581
+ exporters: [
582
+ new CloudExporter({
583
+ endpoint: 'https://collector.example.com',
584
+ }),
585
+ ],
586
+ },
587
+ },
588
+ });
589
+
590
+ // Traces, logs, metrics, scores, and feedback now all publish through CloudExporter.
591
+ ```
592
+
593
+ After updating the exporter endpoint config, the exporter will continue to work for traces, and the same exporter will now also publish structured logs, auto-extracted metrics, scores, and feedback records.
594
+
595
+ - Added `excludeSpanTypes` and `spanFilter` options to `ObservabilityInstanceConfig` for selectively filtering spans before export. Use `excludeSpanTypes` to drop entire categories of spans by type (e.g., `MODEL_CHUNK`, `MODEL_STEP`) or `spanFilter` for fine-grained predicate-based filtering by attributes, metadata, entity, or any combination. Both options help reduce noise and costs in observability platforms that charge per-span. ([#15131](https://github.com/mastra-ai/mastra/pull/15131))
596
+
597
+ **`excludeSpanTypes` example:**
598
+
599
+ ```ts
600
+ excludeSpanTypes: [SpanType.MODEL_CHUNK, SpanType.MODEL_STEP, SpanType.WORKFLOW_SLEEP];
601
+ ```
602
+
603
+ **`spanFilter` example:**
604
+
605
+ ```ts
606
+ spanFilter: span => {
607
+ if (span.type === SpanType.MODEL_CHUNK) return false;
608
+ if (span.type === SpanType.TOOL_CALL && span.attributes?.success) return false;
609
+ return true;
610
+ };
611
+ ```
612
+
613
+ Resolves https://github.com/mastra-ai/mastra/issues/12710
614
+
615
+ ### Patch Changes
616
+
617
+ - ObservabilityBus now honors per-instance `serializationOptions` (maxStringLength, maxDepth, maxArrayLength, maxObjectKeys) when deep-cleaning log/metric/score/feedback payloads, matching the behavior of tracing spans. Previously these signals always used the built-in defaults regardless of user configuration. ([#15138](https://github.com/mastra-ai/mastra/pull/15138))
618
+
619
+ - Apply `deepClean()` to all observability signals (logs, metrics, scores, feedback) before fanning out to exporters and bridges. Previously only tracing spans were deep-cleaned at construction time, leaving free-form payload fields on other signals (e.g. `log.data`, `log.metadata`, `metric.metadata`, `metric.costContext.costMetadata`, `score.metadata`, `feedback.metadata`) susceptible to circular references, oversized strings, and other non-serializable values. Sanitization now happens centrally in `ObservabilityBus.emit()` so every signal leaving the bus is bounded and JSON-safe. ([#15135](https://github.com/mastra-ai/mastra/pull/15135))
620
+
621
+ - `deepClean()` now preserves data for `Map`, `Set`, and richer `Error` objects. Previously Maps and Sets were serialized as empty `{}` (entries silently dropped) and Errors only kept `name`/`message`. Maps are now converted to plain objects of entries, Sets to arrays (both respecting `maxObjectKeys`/`maxArrayLength` and cycle detection), and Errors additionally preserve `stack` and recursively cleaned `cause`. ([#15136](https://github.com/mastra-ai/mastra/pull/15136))
622
+
623
+ - Updated dependencies [[`8db7663`](https://github.com/mastra-ai/mastra/commit/8db7663c9a9c735828094c359d2e327fd4f8fba3), [`153e864`](https://github.com/mastra-ai/mastra/commit/153e86476b425db7cd0dc8490050096e92964a38), [`715710d`](https://github.com/mastra-ai/mastra/commit/715710d12fa47cf88e09d41f13843eddc29327b0), [`378c6c4`](https://github.com/mastra-ai/mastra/commit/378c6c4755726e8d8cf83a14809b350b90d46c62), [`9f91fd5`](https://github.com/mastra-ai/mastra/commit/9f91fd538ab2a44f8cc740bcad8e51205f74fbea), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa)]:
624
+ - @mastra/core@1.24.0
625
+
626
+ ## 1.8.0-alpha.1
627
+
628
+ ### Minor Changes
629
+
630
+ - Added `excludeSpanTypes` and `spanFilter` options to `ObservabilityInstanceConfig` for selectively filtering spans before export. Use `excludeSpanTypes` to drop entire categories of spans by type (e.g., `MODEL_CHUNK`, `MODEL_STEP`) or `spanFilter` for fine-grained predicate-based filtering by attributes, metadata, entity, or any combination. Both options help reduce noise and costs in observability platforms that charge per-span. ([#15131](https://github.com/mastra-ai/mastra/pull/15131))
631
+
632
+ **`excludeSpanTypes` example:**
633
+
634
+ ```ts
635
+ excludeSpanTypes: [SpanType.MODEL_CHUNK, SpanType.MODEL_STEP, SpanType.WORKFLOW_SLEEP];
636
+ ```
637
+
638
+ **`spanFilter` example:**
639
+
640
+ ```ts
641
+ spanFilter: span => {
642
+ if (span.type === SpanType.MODEL_CHUNK) return false;
643
+ if (span.type === SpanType.TOOL_CALL && span.attributes?.success) return false;
644
+ return true;
645
+ };
646
+ ```
647
+
648
+ Resolves https://github.com/mastra-ai/mastra/issues/12710
649
+
650
+ ### Patch Changes
651
+
652
+ - Updated dependencies [[`8db7663`](https://github.com/mastra-ai/mastra/commit/8db7663c9a9c735828094c359d2e327fd4f8fba3), [`715710d`](https://github.com/mastra-ai/mastra/commit/715710d12fa47cf88e09d41f13843eddc29327b0), [`378c6c4`](https://github.com/mastra-ai/mastra/commit/378c6c4755726e8d8cf83a14809b350b90d46c62), [`9f91fd5`](https://github.com/mastra-ai/mastra/commit/9f91fd538ab2a44f8cc740bcad8e51205f74fbea), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa)]:
653
+ - @mastra/core@1.24.0-alpha.1
654
+
655
+ ## 1.8.0-alpha.0
656
+
657
+ ### Minor Changes
658
+
659
+ - Added CloudExporter support for Mastra Observability logs, metrics, scores, and feedback. ([#15124](https://github.com/mastra-ai/mastra/pull/15124))
660
+
661
+ CloudExporter now batches and uploads all Mastra Observability signals to Mastra Cloud, not just tracing spans.
662
+
663
+ This includes a breaking change to the CloudExporter endpoint format. We now pass a base endpoint URL and let let the exporter derive the standard publish paths automatically.
664
+
665
+ ```ts
666
+ import { CloudExporter, Observability } from '@mastra/observability';
667
+
668
+ const observability = new Observability({
669
+ configs: {
670
+ default: {
671
+ serviceName: 'my-app',
672
+ exporters: [
673
+ new CloudExporter({
674
+ endpoint: 'https://collector.example.com',
675
+ }),
676
+ ],
677
+ },
678
+ },
679
+ });
680
+
681
+ // Traces, logs, metrics, scores, and feedback now all publish through CloudExporter.
682
+ ```
683
+
684
+ After updating the exporter endpoint config, the exporter will continue to work for traces, and the same exporter will now also publish structured logs, auto-extracted metrics, scores, and feedback records.
685
+
686
+ ### Patch Changes
687
+
688
+ - ObservabilityBus now honors per-instance `serializationOptions` (maxStringLength, maxDepth, maxArrayLength, maxObjectKeys) when deep-cleaning log/metric/score/feedback payloads, matching the behavior of tracing spans. Previously these signals always used the built-in defaults regardless of user configuration. ([#15138](https://github.com/mastra-ai/mastra/pull/15138))
689
+
690
+ - Apply `deepClean()` to all observability signals (logs, metrics, scores, feedback) before fanning out to exporters and bridges. Previously only tracing spans were deep-cleaned at construction time, leaving free-form payload fields on other signals (e.g. `log.data`, `log.metadata`, `metric.metadata`, `metric.costContext.costMetadata`, `score.metadata`, `feedback.metadata`) susceptible to circular references, oversized strings, and other non-serializable values. Sanitization now happens centrally in `ObservabilityBus.emit()` so every signal leaving the bus is bounded and JSON-safe. ([#15135](https://github.com/mastra-ai/mastra/pull/15135))
691
+
692
+ - `deepClean()` now preserves data for `Map`, `Set`, and richer `Error` objects. Previously Maps and Sets were serialized as empty `{}` (entries silently dropped) and Errors only kept `name`/`message`. Maps are now converted to plain objects of entries, Sets to arrays (both respecting `maxObjectKeys`/`maxArrayLength` and cycle detection), and Errors additionally preserve `stack` and recursively cleaned `cause`. ([#15136](https://github.com/mastra-ai/mastra/pull/15136))
693
+
694
+ - Updated dependencies [[`153e864`](https://github.com/mastra-ai/mastra/commit/153e86476b425db7cd0dc8490050096e92964a38)]:
695
+ - @mastra/core@1.23.1-alpha.0
696
+
697
+ ## 1.7.3
698
+
699
+ ### Patch Changes
700
+
701
+ - Fixed MODEL_STEP span input containing the entire raw HTTP request body instead of just the messages. Observability exporters (Datadog, Langfuse, etc.) now receive clean message arrays as MODEL_STEP span input. ([#15099](https://github.com/mastra-ai/mastra/pull/15099))
702
+
703
+ - Updated dependencies [[`f32b9e1`](https://github.com/mastra-ai/mastra/commit/f32b9e115a3c754d1c8cfa3f4256fba87b09cfb7), [`7d6f521`](https://github.com/mastra-ai/mastra/commit/7d6f52164d0cca099f0b07cb2bba334360f1c8ab), [`a50d220`](https://github.com/mastra-ai/mastra/commit/a50d220b01ecbc5644d489a3d446c3bd4ab30245), [`665477b`](https://github.com/mastra-ai/mastra/commit/665477bc104fd52cfef8e7610d7664781a70c220), [`4cc2755`](https://github.com/mastra-ai/mastra/commit/4cc2755a7194cb08720ff2ab4dffb4b4a5103dfd), [`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`ed425d7`](https://github.com/mastra-ai/mastra/commit/ed425d78e7c66cbda8209fee910856f98c6c6b82), [`1371703`](https://github.com/mastra-ai/mastra/commit/1371703835080450ef3f9aea58059a95d0da2e5a), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`98f8a8b`](https://github.com/mastra-ai/mastra/commit/98f8a8bdf5761b9982f3ad3acbe7f1cc3efa71f3), [`ba6f7e9`](https://github.com/mastra-ai/mastra/commit/ba6f7e9086d8281393f2acae60fda61de3bff1f9), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a), [`1805ddc`](https://github.com/mastra-ai/mastra/commit/1805ddc9c9b3b14b63749735a13c05a45af43a80), [`fff91cf`](https://github.com/mastra-ai/mastra/commit/fff91cf914de0e731578aacebffdeebef82f0440), [`61109b3`](https://github.com/mastra-ai/mastra/commit/61109b34feb0e38d54bee4b8ca83eb7345b1d557), [`33f1ead`](https://github.com/mastra-ai/mastra/commit/33f1eadfa19c86953f593478e5fa371093b33779)]:
704
+ - @mastra/core@1.23.0
705
+
706
+ ## 1.7.3-alpha.0
707
+
708
+ ### Patch Changes
709
+
710
+ - Fixed MODEL_STEP span input containing the entire raw HTTP request body instead of just the messages. Observability exporters (Datadog, Langfuse, etc.) now receive clean message arrays as MODEL_STEP span input. ([#15099](https://github.com/mastra-ai/mastra/pull/15099))
711
+
712
+ - Updated dependencies [[`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`61109b3`](https://github.com/mastra-ai/mastra/commit/61109b34feb0e38d54bee4b8ca83eb7345b1d557), [`33f1ead`](https://github.com/mastra-ai/mastra/commit/33f1eadfa19c86953f593478e5fa371093b33779)]:
713
+ - @mastra/core@1.23.0-alpha.8
9
714
 
10
715
  ## 1.7.2
11
716