@mastra/observability 1.24.1-alpha.0 → 1.24.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.
- package/dist/bus/observability-bus.d.ts +1 -1
- package/dist/bus/observability-bus.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +30 -30
- package/dist/docs/references/docs-observability-integrations-exporters-mastra-storage.md +28 -9
- package/dist/docs/references/docs-observability-tracing-overview.md +1 -0
- package/dist/docs/references/integrations-observability-opentelemetry.md +214 -187
- package/dist/docs/references/reference-observability-feedback.md +13 -0
- package/dist/docs/references/reference-observability-tracing-exporters-mastra-storage-exporter.md +5 -2
- package/dist/docs/references/reference-observability-tracing-exporters-sentry.md +2 -2
- package/dist/exporters/event-buffer.d.ts +16 -1
- package/dist/exporters/event-buffer.d.ts.map +1 -1
- package/dist/exporters/mastra-storage.d.ts +17 -7
- package/dist/exporters/mastra-storage.d.ts.map +1 -1
- package/dist/index.cjs +145 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +145 -43
- package/dist/index.js.map +1 -1
- package/dist/instances/base.d.ts +1 -0
- package/dist/instances/base.d.ts.map +1 -1
- package/dist/spans/base.d.ts +1 -1
- package/package.json +6 -6
|
@@ -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
|
-
|
|
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,EAC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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"}
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -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.1
|
|
6
|
+
version: "1.24.1"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.24.1
|
|
2
|
+
"version": "1.24.1",
|
|
3
3
|
"package": "@mastra/observability",
|
|
4
4
|
"exports": {
|
|
5
5
|
"BaseExporter": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"BaseObservabilityInstance": {
|
|
16
16
|
"types": "dist/instances/base.d.ts",
|
|
17
17
|
"implementation": "dist/index.js",
|
|
18
|
-
"line":
|
|
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":
|
|
33
|
+
"line": 8795
|
|
34
34
|
},
|
|
35
35
|
"ConsoleExporter": {
|
|
36
36
|
"types": "dist/exporters/console.d.ts",
|
|
37
37
|
"implementation": "dist/index.js",
|
|
38
|
-
"line":
|
|
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":
|
|
48
|
+
"line": 7353
|
|
49
49
|
},
|
|
50
50
|
"DefaultExporter": {
|
|
51
51
|
"types": "dist/exporters/default.d.ts",
|
|
52
52
|
"implementation": "dist/index.js",
|
|
53
|
-
"line":
|
|
53
|
+
"line": 5130
|
|
54
54
|
},
|
|
55
55
|
"DefaultObservabilityInstance": {
|
|
56
56
|
"types": "dist/instances/default.d.ts",
|
|
57
57
|
"implementation": "dist/index.js",
|
|
58
|
-
"line":
|
|
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":
|
|
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":
|
|
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":
|
|
83
|
+
"line": 5695
|
|
84
84
|
},
|
|
85
85
|
"MetricsContextImpl": {
|
|
86
86
|
"types": "dist/context/metrics.d.ts",
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"OBSERVABILITY_CAPABILITIES_HEADER": {
|
|
101
101
|
"types": "dist/exporters/mastra-platform.d.ts",
|
|
102
102
|
"implementation": "dist/index.js",
|
|
103
|
-
"line":
|
|
103
|
+
"line": 9349
|
|
104
104
|
},
|
|
105
105
|
"Observability": {
|
|
106
106
|
"types": "dist/default.d.ts",
|
|
107
107
|
"implementation": "dist/index.js",
|
|
108
|
-
"line":
|
|
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":
|
|
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":
|
|
133
|
+
"line": 11169
|
|
134
134
|
},
|
|
135
135
|
"TestExporter": {
|
|
136
136
|
"types": "dist/exporters/test.d.ts",
|
|
137
137
|
"implementation": "dist/index.js",
|
|
138
|
-
"line":
|
|
138
|
+
"line": 10059
|
|
139
139
|
},
|
|
140
140
|
"TraceData": {
|
|
141
141
|
"types": "dist/exporters/tracking.d.ts",
|
|
142
142
|
"implementation": "dist/index.js",
|
|
143
|
-
"line":
|
|
143
|
+
"line": 7514
|
|
144
144
|
},
|
|
145
145
|
"TrackingExporter": {
|
|
146
146
|
"types": "dist/exporters/tracking.d.ts",
|
|
147
147
|
"implementation": "dist/index.js",
|
|
148
|
-
"line":
|
|
148
|
+
"line": 7843
|
|
149
149
|
},
|
|
150
150
|
"buildExportedLog": {
|
|
151
151
|
"types": "dist/client/otlp.d.ts",
|
|
152
152
|
"implementation": "dist/index.js",
|
|
153
|
-
"line":
|
|
153
|
+
"line": 7270
|
|
154
154
|
},
|
|
155
155
|
"buildExportedSpan": {
|
|
156
156
|
"types": "dist/client/otlp.d.ts",
|
|
157
157
|
"implementation": "dist/index.js",
|
|
158
|
-
"line":
|
|
158
|
+
"line": 7252
|
|
159
159
|
},
|
|
160
160
|
"buildTracingOptions": {
|
|
161
161
|
"types": "dist/tracing-options.d.ts",
|
|
162
162
|
"implementation": "dist/index.js",
|
|
163
|
-
"line":
|
|
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":
|
|
168
|
+
"line": 8609
|
|
169
169
|
},
|
|
170
170
|
"createClientObservabilityProxy": {
|
|
171
171
|
"types": "dist/client/proxy.d.ts",
|
|
172
172
|
"implementation": "dist/index.js",
|
|
173
|
-
"line":
|
|
173
|
+
"line": 7495
|
|
174
174
|
},
|
|
175
175
|
"decodeResourceLogs": {
|
|
176
176
|
"types": "dist/client/otlp.d.ts",
|
|
177
177
|
"implementation": "dist/index.js",
|
|
178
|
-
"line":
|
|
178
|
+
"line": 7189
|
|
179
179
|
},
|
|
180
180
|
"decodeResourceSpans": {
|
|
181
181
|
"types": "dist/client/otlp.d.ts",
|
|
182
182
|
"implementation": "dist/index.js",
|
|
183
|
-
"line":
|
|
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":
|
|
193
|
+
"line": 7343
|
|
194
194
|
},
|
|
195
195
|
"formatTraceparent": {
|
|
196
196
|
"types": "dist/client/w3c.d.ts",
|
|
197
197
|
"implementation": "dist/index.js",
|
|
198
|
-
"line":
|
|
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":
|
|
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":
|
|
238
|
+
"line": 7226
|
|
239
239
|
},
|
|
240
240
|
"parseBaggage": {
|
|
241
241
|
"types": "dist/client/w3c.d.ts",
|
|
242
242
|
"implementation": "dist/index.js",
|
|
243
|
-
"line":
|
|
243
|
+
"line": 7316
|
|
244
244
|
},
|
|
245
245
|
"parseTraceparent": {
|
|
246
246
|
"types": "dist/client/w3c.d.ts",
|
|
247
247
|
"implementation": "dist/index.js",
|
|
248
|
-
"line":
|
|
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 |
|
|
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
|
-
//
|
|
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
|