@mastra/observability 1.24.0 → 1.24.1-alpha.1

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.
@@ -85,7 +85,7 @@ export declare class ObservabilityBus extends BaseObservabilityEventBus<Observab
85
85
  */
86
86
  private trackPromise;
87
87
  /** Await in-flight routed handler promises, draining until empty. */
88
- private drainPendingHandlers;
88
+ drainPendingHandlers(): Promise<void>;
89
89
  /** Drain exporter and bridge SDK-internal buffers. */
90
90
  private flushHandlerBuffers;
91
91
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"observability-bus.d.ts","sourceRoot":"","sources":["../../src/bus/observability-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AA0C1D;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,yBAAyB,CAAC,kBAAkB,CAAC;IACjF,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,MAAM,CAAC,CAAsB;IAErC,oFAAoF;IACpF,OAAO,CAAC,eAAe,CAAiC;IAExD,OAAO,CAAC,uBAAuB,CAAK;IACpC,OAAO,CAAC,mCAAmC,CAAK;IAEhD,+EAA+E;IAC/E,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,YAAY,IAAI,CAAC,EAAE;QAAE,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;KAAE,EAGjE;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAKtD;IAED;;;;;OAKG;IACH,kBAAkB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAO3D;IAED;;OA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ACpC,OAAO,CAAC,mCAAmC,CAAK;IAEhD,+EAA+E;IAC/E,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,YAAY,IAAI,CAAC,EAAE;QAAE,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;KAAE,EAGjE;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAKtD;IAED;;;;;OAKG;IACH,kBAAkB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAO3D;IAED;;OAEG;IACH,YAAY,IAAI,SAAS,qBAAqB,EAAE,CAE/C;IAED;;;;;;OAMG;IACH,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAKhD;IAED;;;;OAIG;IACH,gBAAgB,IAAI,OAAO,CAM1B;IAED;;OAEG;IACH,SAAS,IAAI,mBAAmB,GAAG,SAAS,CAE3C;IAED;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,GAAG,IAAI,CAkB/F;IAED;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAYjD;IAED;;;OAGG;IACH,OAAO,CAAC,YAAY;IAQpB,qEAAqE;IAC/D,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB1C;IAED,sDAAsD;YACxC,mBAAmB;IAiBjC;;;;;;;;;;;;;;;OAeG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAmB3B;IAED,6EAA6E;IACvE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAG9B;CACF"}
@@ -19,6 +19,8 @@ import type { AnyExportedSpan, EntityType, ExportedLog, LogLevel } from '@mastra
19
19
  * it through the bus.
20
20
  */
21
21
  export interface DecodedOtlpSpan {
22
+ /** Preserve reversed sub-millisecond timestamps before Date truncation. */
23
+ hasReversedTimestamps?: boolean;
22
24
  traceId: string;
23
25
  spanId: string;
24
26
  parentSpanId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"otlp.d.ts","sourceRoot":"","sources":["../../src/client/otlp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAoDrG;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,EAAE,CAqCvE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,EAAE,CAmCrE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,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aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAClD;AAqKD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qCAAqC,GAC7C,wBAAwB,CAE1B"}
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/client/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAGV,wBAAwB,EAIxB,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AAQpC;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,8BAI5B,CAAC;AAEF,MAAM,WAAW,qCAAqC;IACpD;;;;;OAKG;IACH,eAAe,EAAE,MAAM,qBAAqB,GAAG,SAAS,CAAC;IACzD,2DAA2D;IAC3D,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAClD;AA+KD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qCAAqC,GAC7C,wBAAwB,CAE1B"}
@@ -3,7 +3,7 @@ name: mastra-observability
3
3
  description: Documentation for @mastra/observability. Use when working with @mastra/observability APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/observability"
6
- version: "1.24.0"
6
+ version: "1.24.1-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "1.24.0",
2
+ "version": "1.24.1-alpha.1",
3
3
  "package": "@mastra/observability",
4
4
  "exports": {
5
5
  "BaseExporter": {
6
6
  "types": "dist/exporters/base.d.ts",
7
7
  "implementation": "dist/index.js",
8
- "line": 4314
8
+ "line": 4315
9
9
  },
10
10
  "BaseObservabilityEventBus": {
11
11
  "types": "dist/bus/base.d.ts",
@@ -15,7 +15,7 @@
15
15
  "BaseObservabilityInstance": {
16
16
  "types": "dist/instances/base.d.ts",
17
17
  "implementation": "dist/index.js",
18
- "line": 6252
18
+ "line": 6349
19
19
  },
20
20
  "BaseSpan": {
21
21
  "types": "dist/spans/base.d.ts",
@@ -30,12 +30,12 @@
30
30
  "CloudExporter": {
31
31
  "types": "dist/exporters/cloud.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 8675
33
+ "line": 8795
34
34
  },
35
35
  "ConsoleExporter": {
36
36
  "types": "dist/exporters/console.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 8998
38
+ "line": 9118
39
39
  },
40
40
  "DEFAULT_DEEP_CLEAN_OPTIONS": {
41
41
  "types": "dist/spans/serialization.d.ts",
@@ -45,17 +45,17 @@
45
45
  "DEFAULT_LIMITS": {
46
46
  "types": "dist/client/proxy.d.ts",
47
47
  "implementation": "dist/index.js",
48
- "line": 7241
48
+ "line": 7353
49
49
  },
50
50
  "DefaultExporter": {
51
51
  "types": "dist/exporters/default.d.ts",
52
52
  "implementation": "dist/index.js",
53
- "line": 5074
53
+ "line": 5130
54
54
  },
55
55
  "DefaultObservabilityInstance": {
56
56
  "types": "dist/instances/default.d.ts",
57
57
  "implementation": "dist/index.js",
58
- "line": 10926
58
+ "line": 11046
59
59
  },
60
60
  "DefaultSpan": {
61
61
  "types": "dist/spans/default.d.ts",
@@ -65,7 +65,7 @@
65
65
  "JsonExporter": {
66
66
  "types": "dist/exporters/test.d.ts",
67
67
  "implementation": "dist/index.js",
68
- "line": 10924
68
+ "line": 11044
69
69
  },
70
70
  "LoggerContextImpl": {
71
71
  "types": "dist/context/logger.d.ts",
@@ -75,12 +75,12 @@
75
75
  "MastraPlatformExporter": {
76
76
  "types": "dist/exporters/mastra-platform.d.ts",
77
77
  "implementation": "dist/index.js",
78
- "line": 9328
78
+ "line": 9448
79
79
  },
80
80
  "MastraStorageExporter": {
81
81
  "types": "dist/exporters/mastra-storage.d.ts",
82
82
  "implementation": "dist/index.js",
83
- "line": 5635
83
+ "line": 5695
84
84
  },
85
85
  "MetricsContextImpl": {
86
86
  "types": "dist/context/metrics.d.ts",
@@ -95,17 +95,17 @@
95
95
  "NoOpSpan": {
96
96
  "types": "dist/spans/no-op.d.ts",
97
97
  "implementation": "dist/index.js",
98
- "line": 4257
98
+ "line": 4258
99
99
  },
100
100
  "OBSERVABILITY_CAPABILITIES_HEADER": {
101
101
  "types": "dist/exporters/mastra-platform.d.ts",
102
102
  "implementation": "dist/index.js",
103
- "line": 9229
103
+ "line": 9349
104
104
  },
105
105
  "Observability": {
106
106
  "types": "dist/default.d.ts",
107
107
  "implementation": "dist/index.js",
108
- "line": 11262
108
+ "line": 11382
109
109
  },
110
110
  "ObservabilityBus": {
111
111
  "types": "dist/bus/observability-bus.d.ts",
@@ -115,7 +115,7 @@
115
115
  "QUOTA_PAUSE_CAPABILITY": {
116
116
  "types": "dist/exporters/mastra-platform.d.ts",
117
117
  "implementation": "dist/index.js",
118
- "line": 9230
118
+ "line": 9350
119
119
  },
120
120
  "REDACTED_ERROR_MESSAGE": {
121
121
  "types": "dist/spans/base.d.ts",
@@ -130,57 +130,57 @@
130
130
  "SensitiveDataFilter": {
131
131
  "types": "dist/span_processors/sensitive-data-filter.d.ts",
132
132
  "implementation": "dist/index.js",
133
- "line": 11049
133
+ "line": 11169
134
134
  },
135
135
  "TestExporter": {
136
136
  "types": "dist/exporters/test.d.ts",
137
137
  "implementation": "dist/index.js",
138
- "line": 9939
138
+ "line": 10059
139
139
  },
140
140
  "TraceData": {
141
141
  "types": "dist/exporters/tracking.d.ts",
142
142
  "implementation": "dist/index.js",
143
- "line": 7394
143
+ "line": 7514
144
144
  },
145
145
  "TrackingExporter": {
146
146
  "types": "dist/exporters/tracking.d.ts",
147
147
  "implementation": "dist/index.js",
148
- "line": 7723
148
+ "line": 7843
149
149
  },
150
150
  "buildExportedLog": {
151
151
  "types": "dist/client/otlp.d.ts",
152
152
  "implementation": "dist/index.js",
153
- "line": 7158
153
+ "line": 7270
154
154
  },
155
155
  "buildExportedSpan": {
156
156
  "types": "dist/client/otlp.d.ts",
157
157
  "implementation": "dist/index.js",
158
- "line": 7140
158
+ "line": 7252
159
159
  },
160
160
  "buildTracingOptions": {
161
161
  "types": "dist/tracing-options.d.ts",
162
162
  "implementation": "dist/index.js",
163
- "line": 11603
163
+ "line": 11723
164
164
  },
165
165
  "chainFormatters": {
166
166
  "types": "dist/exporters/span-formatters.d.ts",
167
167
  "implementation": "dist/index.js",
168
- "line": 8489
168
+ "line": 8609
169
169
  },
170
170
  "createClientObservabilityProxy": {
171
171
  "types": "dist/client/proxy.d.ts",
172
172
  "implementation": "dist/index.js",
173
- "line": 7375
173
+ "line": 7495
174
174
  },
175
175
  "decodeResourceLogs": {
176
176
  "types": "dist/client/otlp.d.ts",
177
177
  "implementation": "dist/index.js",
178
- "line": 7077
178
+ "line": 7189
179
179
  },
180
180
  "decodeResourceSpans": {
181
181
  "types": "dist/client/otlp.d.ts",
182
182
  "implementation": "dist/index.js",
183
- "line": 7040
183
+ "line": 7151
184
184
  },
185
185
  "deepClean": {
186
186
  "types": "dist/spans/serialization.d.ts",
@@ -190,12 +190,12 @@
190
190
  "formatBaggage": {
191
191
  "types": "dist/client/w3c.d.ts",
192
192
  "implementation": "dist/index.js",
193
- "line": 7231
193
+ "line": 7343
194
194
  },
195
195
  "formatTraceparent": {
196
196
  "types": "dist/client/w3c.d.ts",
197
197
  "implementation": "dist/index.js",
198
- "line": 7194
198
+ "line": 7306
199
199
  },
200
200
  "getExternalParentId": {
201
201
  "types": "dist/spans/base.d.ts",
@@ -220,7 +220,7 @@
220
220
  "observabilityFeatures": {
221
221
  "types": "dist/features.d.ts",
222
222
  "implementation": "dist/index.js",
223
- "line": 11584
223
+ "line": 11704
224
224
  },
225
225
  "observabilityInstanceConfigSchema": {
226
226
  "types": "dist/config.d.ts",
@@ -235,17 +235,17 @@
235
235
  "otlpSeverityToLogLevel": {
236
236
  "types": "dist/client/otlp.d.ts",
237
237
  "implementation": "dist/index.js",
238
- "line": 7114
238
+ "line": 7226
239
239
  },
240
240
  "parseBaggage": {
241
241
  "types": "dist/client/w3c.d.ts",
242
242
  "implementation": "dist/index.js",
243
- "line": 7204
243
+ "line": 7316
244
244
  },
245
245
  "parseTraceparent": {
246
246
  "types": "dist/client/w3c.d.ts",
247
247
  "implementation": "dist/index.js",
248
- "line": 7180
248
+ "line": 7292
249
249
  },
250
250
  "reconstructSerializedMap": {
251
251
  "types": "dist/spans/serialization.d.ts",
@@ -130,12 +130,14 @@ MastraStorageExporter automatically selects the optimal tracing strategy based o
130
130
 
131
131
  ### Available Strategies
132
132
 
133
- | Strategy | Description | Use Case |
134
- | ---------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------ |
135
- | **realtime** | Process each event immediately | Development, debugging, low traffic |
136
- | **batch-with-updates** | Buffer events and batch write with full lifecycle support | Low volume Production |
137
- | **insert-only** | Only process completed spans, ignore updates | High volume Production |
138
- | **event-sourced** | Write one row when a span starts and another when it ends, then collapse them on read | High volume Production, in-progress traces |
133
+ | Strategy | Description | Use Case |
134
+ | ---------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------- |
135
+ | **realtime** | Process each event immediately | Single-process local development and debugging |
136
+ | **batch-with-updates** | Buffer events and batch write with full lifecycle support | Low volume Production |
137
+ | **insert-only** | Only process completed spans, ignore updates | High volume Production |
138
+ | **event-sourced** | Write one row when a span starts and another when it ends, then collapse them on read | High volume Production, in-progress traces |
139
+
140
+ > **Note:** `realtime` assumes one process owns a span from start to end, so it isn't supported with durable execution (durable agents, and Inngest, Temporal, or evented workflows). When any of these is registered, the exporter logs one warning and runs `batch-with-updates`.
139
141
 
140
142
  ### Strategy Configuration
141
143
 
@@ -185,7 +187,7 @@ The following storage providers **don't support** the observability domain. If y
185
187
 
186
188
  ### Strategy Benefits
187
189
 
188
- - **realtime**: Immediate visibility, best for debugging
190
+ - **realtime**: Immediate visibility, best for debugging in a single process
189
191
  - **batch-with-updates**: 10-100x throughput improvement, full span lifecycle
190
192
  - **insert-only**: Additional 70% reduction in database operations, perfect for analytics
191
193
  - **event-sourced**: Append-only like insert-only, but in-progress traces stay visible in Studio while a run executes
@@ -227,6 +229,23 @@ The MastraStorageExporter includes reliable error handling for production use:
227
229
  - **Persistent Failures**: Drop batch after 4 failed attempts
228
230
  - **Buffer Overflow**: Prevent memory issues during storage outages
229
231
 
232
+ ### Spans ended by another process
233
+
234
+ With durable execution, a worker can end a span before the process that started it stores the span. With `batch-with-updates`, the worker's exporter holds that end and retries it with `maxRetries` and `retryDelayMs`. Other flushes don't send it before its retry time. With `realtime`, the exporter doesn't retry and drops the end right away. An update that doesn't apply is dropped right away, because a retried update could overwrite a newer one. Only an end is retried, since it carries the span's full state.
235
+
236
+ This retry needs a store with conditional span updates: libSQL, PostgreSQL, or the in-memory store. On other stores, the exporter holds the end until its retries run out, then drops it with `retry-exhausted`.
237
+
238
+ The retries must last longer than the other process takes to store the span:
239
+
240
+ - **Worker**: The defaults retry for about 7.5 seconds (500ms, 1s, 2s, 4s).
241
+ - **Process that started the span**: It stores the span within its `maxBatchWaitMs` (5 seconds by default), plus write time and any retries of its own.
242
+
243
+ If you raise `maxBatchWaitMs` on that process, or lower `maxRetries` or `retryDelayMs` on the worker, change the other settings to keep this margin. When the retries run out, the exporter drops the end with `span-not-updatable` and the span stays open in Studio.
244
+
245
+ At `shutdown()`, the exporter tries each held end one last time. It reports an end that still doesn't apply as `span-not-updatable`, and an end whose write fails as `retry-exhausted`.
246
+
247
+ A serverless worker can freeze right after a run's flush. The retry timer may then never fire, so the end isn't stored and no drop event is emitted.
248
+
230
249
  ## Dropped observability events
231
250
 
232
251
  `DefaultExporter` emits structured drop events when it can't persist observability data. Register an exporter or bridge with `onDroppedEvent` to forward these drops to alerting or monitoring.
@@ -235,7 +254,7 @@ Events are dropped for these reasons:
235
254
 
236
255
  - `unsupported-storage`: The storage provider doesn't implement the signal type.
237
256
  - `retry-exhausted`: The exporter retried a batch up to `maxRetries` times and then dropped it.
238
- - `span-not-updatable`: Under `realtime` or `batch-with-updates`, a span update or end reached storage but didn't apply, because the span was never stored or had already ended. Ended spans don't change.
257
+ - `span-not-updatable`: Under `realtime` or `batch-with-updates`, a span update or end reached storage but didn't apply, because the span was never stored or had already ended. Ended spans don't change. With `batch-with-updates`, an end for a span another process started is dropped only after its [retries](#spans-ended-by-another-process) run out.
239
258
 
240
259
  The following example demonstrates forwarding drop details to a monitoring endpoint:
241
260
 
@@ -269,7 +288,7 @@ class DropAlertExporter extends BaseExporter {
269
288
  // Zero config - recommended for most users
270
289
  new MastraStorageExporter()
271
290
 
272
- // Development override
291
+ // Single-process development override
273
292
  new MastraStorageExporter({
274
293
  strategy: 'realtime', // Immediate visibility for debugging
275
294
  })
@@ -987,6 +987,7 @@ Mastra automatically creates spans for:
987
987
 
988
988
  - **Agent runs**: Complete execution with instructions and tools
989
989
  - **Signal-triggered runs**: The `AGENT_RUN` span records a starting signal's `id`, `type`, `tagName`, and `attributes` under `attributes.signal`
990
+ - **Run setup**: `agent:load-thread` covers the memory thread lookup and creation, and `agent:prepare-tools` covers tool resolution before the first model call. The `agent:prepare-tools` output reports `toolCount`. Any tool source that takes 100 ms or longer is listed with its duration in `slowSourcesMs`.
990
991
  - **LLM calls**: Model interactions with tokens and parameters
991
992
  - **Tool executions**: Function calls with inputs and outputs
992
993
  - **Memory operations**: Thread and semantic recall