@mastra/observability 1.23.2-alpha.0 → 1.24.0-alpha.2

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.
Files changed (53) hide show
  1. package/dist/docs/SKILL.md +62 -0
  2. package/dist/docs/assets/SOURCE_MAP.json +272 -0
  3. package/dist/docs/references/docs-mastra-platform-observability.md +416 -0
  4. package/dist/docs/references/docs-observability-feedback.md +204 -0
  5. package/dist/docs/references/docs-observability-integrations-exporters-mastra-storage.md +255 -0
  6. package/dist/docs/references/docs-observability-logging.md +253 -0
  7. package/dist/docs/references/docs-observability-metrics-overview.md +108 -0
  8. package/dist/docs/references/docs-observability-overview.md +235 -0
  9. package/dist/docs/references/docs-observability-tracing-overview.md +1009 -0
  10. package/dist/docs/references/docs-studio-observability.md +125 -0
  11. package/dist/docs/references/integrations-observability-arize.md +278 -0
  12. package/dist/docs/references/integrations-observability-arthur.md +167 -0
  13. package/dist/docs/references/integrations-observability-braintrust.md +205 -0
  14. package/dist/docs/references/integrations-observability-confident-ai.md +166 -0
  15. package/dist/docs/references/integrations-observability-datadog.md +545 -0
  16. package/dist/docs/references/integrations-observability-laminar.md +112 -0
  17. package/dist/docs/references/integrations-observability-langfuse.md +321 -0
  18. package/dist/docs/references/integrations-observability-langsmith.md +235 -0
  19. package/dist/docs/references/integrations-observability-opentelemetry.md +902 -0
  20. package/dist/docs/references/integrations-observability-posthog.md +207 -0
  21. package/dist/docs/references/integrations-observability-sentry.md +212 -0
  22. package/dist/docs/references/reference-file-based-agents-observability.md +34 -0
  23. package/dist/docs/references/reference-observability-feedback.md +464 -0
  24. package/dist/docs/references/reference-observability-metrics-automatic-metrics.md +154 -0
  25. package/dist/docs/references/reference-observability-tracing-bridges-datadog.md +218 -0
  26. package/dist/docs/references/reference-observability-tracing-bridges-otel.md +166 -0
  27. package/dist/docs/references/reference-observability-tracing-configuration.md +225 -0
  28. package/dist/docs/references/reference-observability-tracing-exporters-cloud-exporter.md +251 -0
  29. package/dist/docs/references/reference-observability-tracing-exporters-console-exporter.md +138 -0
  30. package/dist/docs/references/reference-observability-tracing-exporters-datadog.md +126 -0
  31. package/dist/docs/references/reference-observability-tracing-exporters-default-exporter.md +183 -0
  32. package/dist/docs/references/reference-observability-tracing-exporters-langfuse.md +145 -0
  33. package/dist/docs/references/reference-observability-tracing-exporters-mastra-platform-exporter.md +328 -0
  34. package/dist/docs/references/reference-observability-tracing-exporters-mastra-storage-exporter.md +227 -0
  35. package/dist/docs/references/reference-observability-tracing-exporters-sentry.md +190 -0
  36. package/dist/docs/references/reference-observability-tracing-processors-sensitive-data-filter.md +205 -0
  37. package/dist/docs/references/reference-observability-tracing-span-filtering.md +99 -0
  38. package/dist/exporters/event-buffer.d.ts +9 -0
  39. package/dist/exporters/event-buffer.d.ts.map +1 -1
  40. package/dist/exporters/mastra-platform.d.ts +10 -0
  41. package/dist/exporters/mastra-platform.d.ts.map +1 -1
  42. package/dist/exporters/mastra-storage.d.ts +4 -0
  43. package/dist/exporters/mastra-storage.d.ts.map +1 -1
  44. package/dist/exporters/platform-byte-batcher.d.ts +42 -0
  45. package/dist/exporters/platform-byte-batcher.d.ts.map +1 -0
  46. package/dist/exporters/storage-byte-tracker.d.ts +31 -0
  47. package/dist/exporters/storage-byte-tracker.d.ts.map +1 -0
  48. package/dist/index.cjs +477 -93
  49. package/dist/index.cjs.map +1 -1
  50. package/dist/index.js +477 -93
  51. package/dist/index.js.map +1 -1
  52. package/dist/metrics/pricing-data.json +1183 -921
  53. package/package.json +3 -3
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: mastra-observability
3
+ description: Documentation for @mastra/observability. Use when working with @mastra/observability APIs, configuration, or implementation.
4
+ metadata:
5
+ package: "@mastra/observability"
6
+ version: "1.24.0-alpha.2"
7
+ ---
8
+
9
+ ## When to use
10
+
11
+ Use this skill whenever you are working with @mastra/observability to obtain the domain-specific knowledge.
12
+
13
+ ## How to use
14
+
15
+ Read the individual reference documents for detailed explanations and code examples.
16
+
17
+ ### Docs
18
+
19
+ - [Observability](references/docs-mastra-platform-observability.md) - Collect, import, and query hosted traces, logs, metrics, scores, and feedback from Mastra applications with Mastra Platform Observability and local fallback storage.
20
+ - [Feedback](references/docs-observability-feedback.md) - Create, list, delete, aggregate, and export human feedback records in Mastra observability, with ratings and comments linked to specific traces and spans.
21
+ - [Storage exporter](references/docs-observability-integrations-exporters-mastra-storage.md) - Persist Mastra traces and metrics with MastraStorageExporter, choose a storage provider and tracing strategy, and inspect observability data in Studio.
22
+ - [Logging](references/docs-observability-logging.md) - Configure structured Mastra logging with PinoLogger, trace correlation, observability storage, custom logger adapters, log levels, and query APIs.
23
+ - [Metrics](references/docs-observability-metrics-overview.md) - Collect automatic duration, token usage, and cost metrics from Mastra traces, store them in supported databases, and analyze them in Studio.
24
+ - [Observability](references/docs-observability-overview.md) - Configure Mastra observability to collect traces, logs, metrics, scores, and feedback for monitoring, debugging, and optimizing AI applications.
25
+ - [Usage](references/docs-observability-tracing-overview.md) - Trace Mastra agents, workflows, tools, and model calls with hierarchical spans, sampling, metadata, tags, filtering, serialization, and external context.
26
+ - [Observability](references/docs-studio-observability.md) - Monitor Mastra agents, workflows, tools, and model calls in Studio with metrics dashboards, hierarchical traces, and searchable correlated logs.
27
+
28
+ ### Integrations
29
+
30
+ - [Arize](references/integrations-observability-arize.md) - Export Mastra traces to Arize Phoenix or Arize AX for AI observability and evaluation, with project, endpoint, API key, and environment configuration.
31
+ - [Arthur](references/integrations-observability-arthur.md) - Export Mastra traces to Arthur Engine or Arthur Cloud for AI observability, configure task routing and credentials, and monitor agent behavior.
32
+ - [Braintrust](references/integrations-observability-braintrust.md) - Export Mastra traces to Braintrust for LLM evaluation and monitoring with zero-config environment variables or explicit project configuration.
33
+ - [Confident AI](references/integrations-observability-confident-ai.md) - Export Mastra traces to Confident AI for LLM observability and online evals, using environment credentials or explicit exporter configuration.
34
+ - [Datadog](references/integrations-observability-datadog.md) - Send Mastra traces to Datadog LLM Observability with exporter configuration, span type mapping, agent and workflow naming, and serverless flushing.
35
+ - [Laminar](references/integrations-observability-laminar.md) - Export Mastra traces to Laminar for OpenTelemetry-native agent observability, debugging, and monitoring with endpoint and API key configuration.
36
+ - [Langfuse](references/integrations-observability-langfuse.md) - Export Mastra traces to Langfuse for open-source LLM observability, configure credentials and endpoints, and inspect prompts, tools, and generations.
37
+ - [LangSmith](references/integrations-observability-langsmith.md) - Export Mastra traces to LangSmith for LLM monitoring and evaluation with project, API key, endpoint, and environment configuration.
38
+ - [OpenTelemetry](references/integrations-observability-opentelemetry.md) - Connect Mastra observability to OpenTelemetry with an exporter for traces and logs or a bridge for joining existing distributed trace contexts.
39
+ - [PostHog](references/integrations-observability-posthog.md) - Give Mastra agents PostHog tools through Mastra Connect, and export Mastra traces to PostHog AI observability with serverless flushing.
40
+ - [Sentry](references/integrations-observability-sentry.md) - Export Mastra traces to Sentry AI monitoring with OpenTelemetry semantic conventions, zero-config setup, and optional SDK or exporter settings.
41
+
42
+ ### Reference
43
+
44
+ - [Observability](references/reference-file-based-agents-observability.md) - Mastra configures observability from an observability.ts file directly under src/mastra/.
45
+ - [Reference: Feedback](references/reference-observability-feedback.md) - Feedback APIs store and query human-in-the-loop observability signals such as ratings, thumbs, comments, and corrections.
46
+ - [Reference: Automatic Metrics](references/reference-observability-metrics-automatic-metrics.md) - Mastra automatically extracts performance and usage metrics from traced execution. This page is the complete reference for every metric name, label, and context field that Mastra emits.
47
+ - [Reference: DatadogBridge](references/reference-observability-tracing-bridges-datadog.md) - Configure DatadogBridge for bidirectional context propagation between Mastra tracing and Datadog APM spans, including trace and parent IDs.
48
+ - [Reference: OtelBridge](references/reference-observability-tracing-bridges-otel.md) - Enables bidirectional integration between Mastra tracing and OpenTelemetry infrastructure. Creates native OTEL spans for Mastra operations and inherits context from active OTEL spans.
49
+ - [Reference: Configuration](references/reference-observability-tracing-configuration.md) - Configure Mastra observability instances, tracing exporters, sampling, propagation, span filters, and the global observability registry.
50
+ - [Reference: CloudExporter](references/reference-observability-tracing-exporters-cloud-exporter.md) - Use the deprecated CloudExporter to send traces to Mastra Cloud in older releases, and migrate configuration to MastraPlatformExporter.
51
+ - [Reference: ConsoleExporter](references/reference-observability-tracing-exporters-console-exporter.md) - Configure ConsoleExporter to print Mastra trace events, spans, attributes, and lifecycle updates to the console for local debugging.
52
+ - [Reference: DatadogExporter](references/reference-observability-tracing-exporters-datadog.md) - Configure DatadogExporter to send Mastra traces into Datadog LLM Observability, supporting application monitoring and analysis of spans and AI performance.
53
+ - [Reference: DefaultExporter](references/reference-observability-tracing-exporters-default-exporter.md) - Persists observability events to Mastra Storage with automatic batching and retry logic.
54
+ - [Reference: LangfuseExporter](references/reference-observability-tracing-exporters-langfuse.md) - Configure LangfuseExporter to send Mastra traces to Langfuse with credentials, custom endpoints, batching, environments, releases, and client access.
55
+ - [Reference: MastraPlatformExporter](references/reference-observability-tracing-exporters-mastra-platform-exporter.md) - Configure MastraPlatformExporter to send traces to Mastra Platform with project credentials, batching, retries, and compatibility with CloudExporter.
56
+ - [Reference: MastraStorageExporter](references/reference-observability-tracing-exporters-mastra-storage-exporter.md) - Persists traces to Mastra's configured storage with automatic batching and retry logic.
57
+ - [Reference: SentryExporter](references/reference-observability-tracing-exporters-sentry.md) - Configure SentryExporter to send Mastra traces to Sentry for AI monitoring and analysis through OpenTelemetry-compatible semantic conventions.
58
+ - [Reference: SensitiveDataFilter](references/reference-observability-tracing-processors-sensitive-data-filter.md) - SensitiveDataFilter is a span output processor that redacts values whose field names match a configured list.
59
+ - [Reference: Span filtering](references/reference-observability-tracing-span-filtering.md) - Span filtering controls which spans are exported from an observability config. Use it to reduce noise or lower per-span costs.
60
+
61
+
62
+ Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
@@ -0,0 +1,272 @@
1
+ {
2
+ "version": "1.24.0-alpha.2",
3
+ "package": "@mastra/observability",
4
+ "exports": {
5
+ "BaseExporter": {
6
+ "types": "dist/exporters/base.d.ts",
7
+ "implementation": "dist/index.js",
8
+ "line": 4147
9
+ },
10
+ "BaseObservabilityEventBus": {
11
+ "types": "dist/bus/base.d.ts",
12
+ "implementation": "dist/index.js",
13
+ "line": 96
14
+ },
15
+ "BaseObservabilityInstance": {
16
+ "types": "dist/instances/base.d.ts",
17
+ "implementation": "dist/index.js",
18
+ "line": 5602
19
+ },
20
+ "BaseSpan": {
21
+ "types": "dist/spans/base.d.ts",
22
+ "implementation": "dist/index.js",
23
+ "line": 3433
24
+ },
25
+ "CardinalityFilter": {
26
+ "types": "dist/metrics/cardinality.d.ts",
27
+ "implementation": "dist/index.js",
28
+ "line": 2075
29
+ },
30
+ "CloudExporter": {
31
+ "types": "dist/exporters/cloud.d.ts",
32
+ "implementation": "dist/index.js",
33
+ "line": 8007
34
+ },
35
+ "ConsoleExporter": {
36
+ "types": "dist/exporters/console.d.ts",
37
+ "implementation": "dist/index.js",
38
+ "line": 8330
39
+ },
40
+ "DEFAULT_DEEP_CLEAN_OPTIONS": {
41
+ "types": "dist/spans/serialization.d.ts",
42
+ "implementation": "dist/index.js",
43
+ "line": 199
44
+ },
45
+ "DEFAULT_LIMITS": {
46
+ "types": "dist/client/proxy.d.ts",
47
+ "implementation": "dist/index.js",
48
+ "line": 6573
49
+ },
50
+ "DefaultExporter": {
51
+ "types": "dist/exporters/default.d.ts",
52
+ "implementation": "dist/index.js",
53
+ "line": 4529
54
+ },
55
+ "DefaultObservabilityInstance": {
56
+ "types": "dist/instances/default.d.ts",
57
+ "implementation": "dist/index.js",
58
+ "line": 10157
59
+ },
60
+ "DefaultSpan": {
61
+ "types": "dist/spans/default.d.ts",
62
+ "implementation": "dist/index.js",
63
+ "line": 3919
64
+ },
65
+ "JsonExporter": {
66
+ "types": "dist/exporters/test.d.ts",
67
+ "implementation": "dist/index.js",
68
+ "line": 10155
69
+ },
70
+ "LoggerContextImpl": {
71
+ "types": "dist/context/logger.d.ts",
72
+ "implementation": "dist/index.js",
73
+ "line": 937
74
+ },
75
+ "MastraPlatformExporter": {
76
+ "types": "dist/exporters/mastra-platform.d.ts",
77
+ "implementation": "dist/index.js",
78
+ "line": 8625
79
+ },
80
+ "MastraStorageExporter": {
81
+ "types": "dist/exporters/mastra-storage.d.ts",
82
+ "implementation": "dist/index.js",
83
+ "line": 5038
84
+ },
85
+ "MetricsContextImpl": {
86
+ "types": "dist/context/metrics.d.ts",
87
+ "implementation": "dist/index.js",
88
+ "line": 1001
89
+ },
90
+ "ModelSpanTracker": {
91
+ "types": "dist/model-tracing.d.ts",
92
+ "implementation": "dist/index.js",
93
+ "line": 2507
94
+ },
95
+ "NoOpSpan": {
96
+ "types": "dist/spans/no-op.d.ts",
97
+ "implementation": "dist/index.js",
98
+ "line": 4090
99
+ },
100
+ "OBSERVABILITY_CAPABILITIES_HEADER": {
101
+ "types": "dist/exporters/mastra-platform.d.ts",
102
+ "implementation": "dist/index.js",
103
+ "line": 8526
104
+ },
105
+ "Observability": {
106
+ "types": "dist/default.d.ts",
107
+ "implementation": "dist/index.js",
108
+ "line": 10814
109
+ },
110
+ "ObservabilityBus": {
111
+ "types": "dist/bus/observability-bus.d.ts",
112
+ "implementation": "dist/index.js",
113
+ "line": 568
114
+ },
115
+ "QUOTA_PAUSE_CAPABILITY": {
116
+ "types": "dist/exporters/mastra-platform.d.ts",
117
+ "implementation": "dist/index.js",
118
+ "line": 8527
119
+ },
120
+ "SamplingStrategyType": {
121
+ "types": "dist/config.d.ts",
122
+ "implementation": "dist/index.js",
123
+ "line": 737
124
+ },
125
+ "SensitiveDataFilter": {
126
+ "types": "dist/span_processors/sensitive-data-filter.d.ts",
127
+ "implementation": "dist/index.js",
128
+ "line": 10584
129
+ },
130
+ "TestExporter": {
131
+ "types": "dist/exporters/test.d.ts",
132
+ "implementation": "dist/index.js",
133
+ "line": 9170
134
+ },
135
+ "TraceData": {
136
+ "types": "dist/exporters/tracking.d.ts",
137
+ "implementation": "dist/index.js",
138
+ "line": 6726
139
+ },
140
+ "TrackingExporter": {
141
+ "types": "dist/exporters/tracking.d.ts",
142
+ "implementation": "dist/index.js",
143
+ "line": 7055
144
+ },
145
+ "buildExportedLog": {
146
+ "types": "dist/client/otlp.d.ts",
147
+ "implementation": "dist/index.js",
148
+ "line": 6490
149
+ },
150
+ "buildExportedSpan": {
151
+ "types": "dist/client/otlp.d.ts",
152
+ "implementation": "dist/index.js",
153
+ "line": 6472
154
+ },
155
+ "buildTracingOptions": {
156
+ "types": "dist/tracing-options.d.ts",
157
+ "implementation": "dist/index.js",
158
+ "line": 11159
159
+ },
160
+ "chainFormatters": {
161
+ "types": "dist/exporters/span-formatters.d.ts",
162
+ "implementation": "dist/index.js",
163
+ "line": 7821
164
+ },
165
+ "createClientObservabilityProxy": {
166
+ "types": "dist/client/proxy.d.ts",
167
+ "implementation": "dist/index.js",
168
+ "line": 6707
169
+ },
170
+ "decodeResourceLogs": {
171
+ "types": "dist/client/otlp.d.ts",
172
+ "implementation": "dist/index.js",
173
+ "line": 6409
174
+ },
175
+ "decodeResourceSpans": {
176
+ "types": "dist/client/otlp.d.ts",
177
+ "implementation": "dist/index.js",
178
+ "line": 6372
179
+ },
180
+ "deepClean": {
181
+ "types": "dist/spans/serialization.d.ts",
182
+ "implementation": "dist/index.js",
183
+ "line": 342
184
+ },
185
+ "formatBaggage": {
186
+ "types": "dist/client/w3c.d.ts",
187
+ "implementation": "dist/index.js",
188
+ "line": 6563
189
+ },
190
+ "formatTraceparent": {
191
+ "types": "dist/client/w3c.d.ts",
192
+ "implementation": "dist/index.js",
193
+ "line": 6526
194
+ },
195
+ "getExternalParentId": {
196
+ "types": "dist/spans/base.d.ts",
197
+ "implementation": "dist/index.js",
198
+ "line": 3414
199
+ },
200
+ "isSerializedMap": {
201
+ "types": "dist/spans/serialization.d.ts",
202
+ "implementation": "dist/index.js",
203
+ "line": 316
204
+ },
205
+ "mergeSerializationOptions": {
206
+ "types": "dist/spans/serialization.d.ts",
207
+ "implementation": "dist/index.js",
208
+ "line": 210
209
+ },
210
+ "observabilityConfigValueSchema": {
211
+ "types": "dist/config.d.ts",
212
+ "implementation": "dist/index.js",
213
+ "line": 816
214
+ },
215
+ "observabilityFeatures": {
216
+ "types": "dist/features.d.ts",
217
+ "implementation": "dist/index.js",
218
+ "line": 11140
219
+ },
220
+ "observabilityInstanceConfigSchema": {
221
+ "types": "dist/config.d.ts",
222
+ "implementation": "dist/index.js",
223
+ "line": 804
224
+ },
225
+ "observabilityRegistryConfigSchema": {
226
+ "types": "dist/config.d.ts",
227
+ "implementation": "dist/index.js",
228
+ "line": 836
229
+ },
230
+ "otlpSeverityToLogLevel": {
231
+ "types": "dist/client/otlp.d.ts",
232
+ "implementation": "dist/index.js",
233
+ "line": 6446
234
+ },
235
+ "parseBaggage": {
236
+ "types": "dist/client/w3c.d.ts",
237
+ "implementation": "dist/index.js",
238
+ "line": 6536
239
+ },
240
+ "parseTraceparent": {
241
+ "types": "dist/client/w3c.d.ts",
242
+ "implementation": "dist/index.js",
243
+ "line": 6512
244
+ },
245
+ "reconstructSerializedMap": {
246
+ "types": "dist/spans/serialization.d.ts",
247
+ "implementation": "dist/index.js",
248
+ "line": 319
249
+ },
250
+ "routeToHandler": {
251
+ "types": "dist/bus/route-event.d.ts",
252
+ "implementation": "dist/index.js",
253
+ "line": 28
254
+ },
255
+ "samplingStrategySchema": {
256
+ "types": "dist/config.d.ts",
257
+ "implementation": "dist/index.js",
258
+ "line": 748
259
+ },
260
+ "serializationOptionsSchema": {
261
+ "types": "dist/config.d.ts",
262
+ "implementation": "dist/index.js",
263
+ "line": 763
264
+ },
265
+ "truncateString": {
266
+ "types": "dist/spans/serialization.d.ts",
267
+ "implementation": "dist/index.js",
268
+ "line": 229
269
+ }
270
+ },
271
+ "modules": {}
272
+ }