@mastra/observability 0.0.0-main-test-2-20251127211532 → 0.0.0-mastra-auto-detect-server-20260108233416

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/README.md CHANGED
@@ -1,99 +1,54 @@
1
1
  # Mastra Observability
2
2
 
3
- A comprehensive observability system for AI operations in Mastra, providing type-safe span tracking, event-driven exports, and flexible tracing configuration.
3
+ Tracing and monitoring for AI operations in Mastra.
4
4
 
5
- ## Overview
5
+ ## Installation
6
6
 
7
- The Mastra Observability system enables detailed observability for AI-driven applications by tracking operations through spans that capture metadata, timing, and context. It's designed to work seamlessly with Mastra's architecture while providing flexible configuration and export options.
8
-
9
- ## Key Features
10
-
11
- - **Type-Safe Spans**: Strongly typed metadata based on span type prevents runtime errors
12
- - **Event-Driven Architecture**: Real-time tracing events for immediate observability
13
- - **OpenTelemetry Compatible**: Uses standard trace and span ID formats for integration
14
- - **Flexible Sampling**: Multiple sampling strategies with custom sampler support
15
- - **Pluggable Processors**: Modify or filter span fields before export
16
- - **Pluggable Exporters**: Multiple export formats and destinations
17
- - **Automatic Lifecycle Management**: Spans automatically emit events without manual intervention
18
-
19
- ## Quick Start
20
-
21
- ### Manual Tracing
22
-
23
- ```typescript
24
- import { DefaultObservabilityInstance, SpanType } from '@mastra/observability';
25
-
26
- // Create observability instance
27
- const observability = new DefaultObservabilityInstance({
28
- name: 'my-app',
29
- serviceName: 'my-app',
30
- });
31
-
32
- // Start an agent span
33
- const agentSpan = observability.startSpan({
34
- type: SpanType.AGENT_RUN,
35
- name: 'customer-support-agent',
36
- attributes: {
37
- agentId: 'agent-123',
38
- instructions: 'Help with customer support',
39
- maxSteps: 10,
40
- },
41
- });
42
-
43
- // Create child spans for nested operations
44
- const llmSpan = agentSpan.createChildSpan({
45
- type: SpanType.MODEL_GENERATION,
46
- name: 'gpt-4-response',
47
- attributes: {
48
- model: 'gpt-4',
49
- provider: 'openai',
50
- streaming: false,
51
- },
52
- });
53
-
54
- // End spans with results
55
- llmSpan.end({
56
- output: 'Generated response',
57
- attributes: { usage: { totalTokens: 180 } },
58
- });
59
- agentSpan.end();
7
+ ```bash
8
+ npm install @mastra/observability
60
9
  ```
61
10
 
62
- ### Span Types
63
-
64
- - **`WORKFLOW_RUN`**: Root span for entire workflow execution
65
- - **`WORKFLOW_STEP`**: Individual step execution within a workflow
66
- - **`AGENT_RUN`**: Agent processing (supports tools, memory, multi-step)
67
- - **`MODEL_GENERATION`**: Individual model API calls with token usage
68
- - **`TOOL_CALL`**: Function/tool execution
69
- - **`MCP_TOOL_CALL`**: Model Context Protocol tool execution
70
- - **`PROCESSOR_RUN`**: Input/output processor execution
71
- - **`GENERIC`**: Custom spans for other operations
72
-
73
- ### Basic Configuration
74
-
75
- Enable observability in your Mastra instance:
11
+ ## Quick Start
76
12
 
77
13
  ```typescript
78
14
  import { Mastra } from '@mastra/core';
79
- import { Observability } from '@mastra/observability';
15
+ import { Observability, DefaultExporter, CloudExporter, SensitiveDataFilter } from '@mastra/observability';
80
16
 
81
17
  export const mastra = new Mastra({
82
- // ... other config
83
18
  observability: new Observability({
84
- default: { enabled: true },
19
+ configs: {
20
+ default: {
21
+ serviceName: 'my-app',
22
+ exporters: [
23
+ new DefaultExporter(), // Persists traces for Mastra Studio
24
+ new CloudExporter(), // Sends to Mastra Cloud
25
+ ],
26
+ spanOutputProcessors: [new SensitiveDataFilter()],
27
+ },
28
+ },
85
29
  }),
86
30
  });
87
31
  ```
88
32
 
89
- This enables the `DefaultExporter` and `CloudExporter`, with the `SensitiveDataFilter` span output processor, and `always` sampling.
33
+ ## Features
34
+
35
+ - **Auto-instrumentation** - Traces agent runs, LLM calls, tool executions, and workflows
36
+ - **Pluggable Exporters** - Exporters for Studio and Cloud, plus integrations for Arize, Braintrust, Langfuse, LangSmith, and OpenTelemetry
37
+ - **Sampling Strategies** - Always, ratio-based, or custom sampling
38
+ - **Span Processors** - Transform or filter span data before export
39
+ - **OpenTelemetry Compatible** - Standard trace/span ID formats for integration
90
40
 
91
- ## Performance Considerations
41
+ ## Span Types
92
42
 
93
- ### Current Implementation
43
+ - `WORKFLOW_RUN` - Workflow execution
44
+ - `WORKFLOW_STEP` - Individual workflow step
45
+ - `AGENT_RUN` - Agent processing
46
+ - `MODEL_GENERATION` - LLM API calls
47
+ - `TOOL_CALL` - Tool execution
48
+ - `MCP_TOOL_CALL` - MCP tool execution
49
+ - `PROCESSOR_RUN` - Processor execution
50
+ - `GENERIC` - Custom operations
94
51
 
95
- The current implementation prioritizes correctness and ease of use:
52
+ ## Documentation
96
53
 
97
- - **Automatic Lifecycle Management**: All spans automatically emit events through method wrapping
98
- - **Real-time Export**: Events are exported immediately when they occur
99
- - **Memory Overhead**: Each span maintains references to tracing instance
54
+ For configuration options, exporters, sampling strategies, and more, see the [full documentation](https://mastra.ai/docs/v1/observability/overview).
package/dist/config.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * including tracing configs, sampling strategies, and registry setup.
6
6
  */
7
7
  import type { RequestContext } from '@mastra/core/di';
8
- import type { ObservabilityInstance, ObservabilityExporter, ObservabilityBridge, SpanOutputProcessor, ConfigSelector } from '@mastra/core/observability';
8
+ import type { ObservabilityInstance, ObservabilityExporter, ObservabilityBridge, SpanOutputProcessor, ConfigSelector, SerializationOptions } from '@mastra/core/observability';
9
9
  import { z } from 'zod';
10
10
  /**
11
11
  * Sampling strategy types
@@ -61,12 +61,21 @@ export interface ObservabilityInstanceConfig {
61
61
  * Supports dot notation for nested values.
62
62
  */
63
63
  requestContextKeys?: string[];
64
+ /**
65
+ * Options for controlling serialization of span data (input/output/attributes).
66
+ * Use these to customize truncation limits for large payloads.
67
+ */
68
+ serializationOptions?: SerializationOptions;
64
69
  }
65
70
  /**
66
71
  * Complete Observability registry configuration
67
72
  */
68
73
  export interface ObservabilityRegistryConfig {
69
- /** Enables default exporters, with sampling: always, and sensitive data filtering */
74
+ /**
75
+ * Enables default exporters, with sampling: always, and sensitive data filtering
76
+ * @deprecated Use explicit `configs` with DefaultExporter, CloudExporter, and SensitiveDataFilter instead.
77
+ * This option will be removed in a future version.
78
+ */
70
79
  default?: {
71
80
  enabled?: boolean;
72
81
  };
@@ -109,6 +118,25 @@ export declare const samplingStrategySchema: z.ZodDiscriminatedUnion<"type", [z.
109
118
  type: SamplingStrategyType.CUSTOM;
110
119
  sampler: (args_0: any, ...args: unknown[]) => boolean;
111
120
  }>]>;
121
+ /**
122
+ * Zod schema for SerializationOptions
123
+ */
124
+ export declare const serializationOptionsSchema: z.ZodOptional<z.ZodObject<{
125
+ maxStringLength: z.ZodOptional<z.ZodNumber>;
126
+ maxDepth: z.ZodOptional<z.ZodNumber>;
127
+ maxArrayLength: z.ZodOptional<z.ZodNumber>;
128
+ maxObjectKeys: z.ZodOptional<z.ZodNumber>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ maxStringLength?: number | undefined;
131
+ maxDepth?: number | undefined;
132
+ maxArrayLength?: number | undefined;
133
+ maxObjectKeys?: number | undefined;
134
+ }, {
135
+ maxStringLength?: number | undefined;
136
+ maxDepth?: number | undefined;
137
+ maxArrayLength?: number | undefined;
138
+ maxObjectKeys?: number | undefined;
139
+ }>>;
112
140
  /**
113
141
  * Zod schema for ObservabilityInstanceConfig
114
142
  * Note: exporters, spanOutputProcessors, bridge, and configSelector are validated as any
@@ -153,6 +181,22 @@ export declare const observabilityInstanceConfigSchema: z.ZodEffects<z.ZodObject
153
181
  spanOutputProcessors: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
154
182
  includeInternalSpans: z.ZodOptional<z.ZodBoolean>;
155
183
  requestContextKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
184
+ serializationOptions: z.ZodOptional<z.ZodObject<{
185
+ maxStringLength: z.ZodOptional<z.ZodNumber>;
186
+ maxDepth: z.ZodOptional<z.ZodNumber>;
187
+ maxArrayLength: z.ZodOptional<z.ZodNumber>;
188
+ maxObjectKeys: z.ZodOptional<z.ZodNumber>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ maxStringLength?: number | undefined;
191
+ maxDepth?: number | undefined;
192
+ maxArrayLength?: number | undefined;
193
+ maxObjectKeys?: number | undefined;
194
+ }, {
195
+ maxStringLength?: number | undefined;
196
+ maxDepth?: number | undefined;
197
+ maxArrayLength?: number | undefined;
198
+ maxObjectKeys?: number | undefined;
199
+ }>>;
156
200
  }, "strip", z.ZodTypeAny, {
157
201
  name: string;
158
202
  serviceName: string;
@@ -172,6 +216,12 @@ export declare const observabilityInstanceConfigSchema: z.ZodEffects<z.ZodObject
172
216
  spanOutputProcessors?: any[] | undefined;
173
217
  includeInternalSpans?: boolean | undefined;
174
218
  requestContextKeys?: string[] | undefined;
219
+ serializationOptions?: {
220
+ maxStringLength?: number | undefined;
221
+ maxDepth?: number | undefined;
222
+ maxArrayLength?: number | undefined;
223
+ maxObjectKeys?: number | undefined;
224
+ } | undefined;
175
225
  }, {
176
226
  name: string;
177
227
  serviceName: string;
@@ -191,6 +241,12 @@ export declare const observabilityInstanceConfigSchema: z.ZodEffects<z.ZodObject
191
241
  spanOutputProcessors?: any[] | undefined;
192
242
  includeInternalSpans?: boolean | undefined;
193
243
  requestContextKeys?: string[] | undefined;
244
+ serializationOptions?: {
245
+ maxStringLength?: number | undefined;
246
+ maxDepth?: number | undefined;
247
+ maxArrayLength?: number | undefined;
248
+ maxObjectKeys?: number | undefined;
249
+ } | undefined;
194
250
  }>, {
195
251
  name: string;
196
252
  serviceName: string;
@@ -210,6 +266,12 @@ export declare const observabilityInstanceConfigSchema: z.ZodEffects<z.ZodObject
210
266
  spanOutputProcessors?: any[] | undefined;
211
267
  includeInternalSpans?: boolean | undefined;
212
268
  requestContextKeys?: string[] | undefined;
269
+ serializationOptions?: {
270
+ maxStringLength?: number | undefined;
271
+ maxDepth?: number | undefined;
272
+ maxArrayLength?: number | undefined;
273
+ maxObjectKeys?: number | undefined;
274
+ } | undefined;
213
275
  }, {
214
276
  name: string;
215
277
  serviceName: string;
@@ -229,6 +291,12 @@ export declare const observabilityInstanceConfigSchema: z.ZodEffects<z.ZodObject
229
291
  spanOutputProcessors?: any[] | undefined;
230
292
  includeInternalSpans?: boolean | undefined;
231
293
  requestContextKeys?: string[] | undefined;
294
+ serializationOptions?: {
295
+ maxStringLength?: number | undefined;
296
+ maxDepth?: number | undefined;
297
+ maxArrayLength?: number | undefined;
298
+ maxObjectKeys?: number | undefined;
299
+ } | undefined;
232
300
  }>;
233
301
  /**
234
302
  * Zod schema for config values in the configs map
@@ -272,6 +340,22 @@ export declare const observabilityConfigValueSchema: z.ZodEffects<z.ZodObject<{
272
340
  spanOutputProcessors: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
273
341
  includeInternalSpans: z.ZodOptional<z.ZodBoolean>;
274
342
  requestContextKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
343
+ serializationOptions: z.ZodOptional<z.ZodObject<{
344
+ maxStringLength: z.ZodOptional<z.ZodNumber>;
345
+ maxDepth: z.ZodOptional<z.ZodNumber>;
346
+ maxArrayLength: z.ZodOptional<z.ZodNumber>;
347
+ maxObjectKeys: z.ZodOptional<z.ZodNumber>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ maxStringLength?: number | undefined;
350
+ maxDepth?: number | undefined;
351
+ maxArrayLength?: number | undefined;
352
+ maxObjectKeys?: number | undefined;
353
+ }, {
354
+ maxStringLength?: number | undefined;
355
+ maxDepth?: number | undefined;
356
+ maxArrayLength?: number | undefined;
357
+ maxObjectKeys?: number | undefined;
358
+ }>>;
275
359
  }, "strip", z.ZodTypeAny, {
276
360
  serviceName: string;
277
361
  sampling?: {
@@ -290,6 +374,12 @@ export declare const observabilityConfigValueSchema: z.ZodEffects<z.ZodObject<{
290
374
  spanOutputProcessors?: any[] | undefined;
291
375
  includeInternalSpans?: boolean | undefined;
292
376
  requestContextKeys?: string[] | undefined;
377
+ serializationOptions?: {
378
+ maxStringLength?: number | undefined;
379
+ maxDepth?: number | undefined;
380
+ maxArrayLength?: number | undefined;
381
+ maxObjectKeys?: number | undefined;
382
+ } | undefined;
293
383
  }, {
294
384
  serviceName: string;
295
385
  sampling?: {
@@ -308,6 +398,12 @@ export declare const observabilityConfigValueSchema: z.ZodEffects<z.ZodObject<{
308
398
  spanOutputProcessors?: any[] | undefined;
309
399
  includeInternalSpans?: boolean | undefined;
310
400
  requestContextKeys?: string[] | undefined;
401
+ serializationOptions?: {
402
+ maxStringLength?: number | undefined;
403
+ maxDepth?: number | undefined;
404
+ maxArrayLength?: number | undefined;
405
+ maxObjectKeys?: number | undefined;
406
+ } | undefined;
311
407
  }>, {
312
408
  serviceName: string;
313
409
  sampling?: {
@@ -326,6 +422,12 @@ export declare const observabilityConfigValueSchema: z.ZodEffects<z.ZodObject<{
326
422
  spanOutputProcessors?: any[] | undefined;
327
423
  includeInternalSpans?: boolean | undefined;
328
424
  requestContextKeys?: string[] | undefined;
425
+ serializationOptions?: {
426
+ maxStringLength?: number | undefined;
427
+ maxDepth?: number | undefined;
428
+ maxArrayLength?: number | undefined;
429
+ maxObjectKeys?: number | undefined;
430
+ } | undefined;
329
431
  }, {
330
432
  serviceName: string;
331
433
  sampling?: {
@@ -344,6 +446,12 @@ export declare const observabilityConfigValueSchema: z.ZodEffects<z.ZodObject<{
344
446
  spanOutputProcessors?: any[] | undefined;
345
447
  includeInternalSpans?: boolean | undefined;
346
448
  requestContextKeys?: string[] | undefined;
449
+ serializationOptions?: {
450
+ maxStringLength?: number | undefined;
451
+ maxDepth?: number | undefined;
452
+ maxArrayLength?: number | undefined;
453
+ maxObjectKeys?: number | undefined;
454
+ } | undefined;
347
455
  }>;
348
456
  /**
349
457
  * Zod schema for ObservabilityRegistryConfig
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACr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AAY;IAC7C,IAAI,SAAyC;IAE7C,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,UAAU,CAA+B;gBAErC,MAAM,GAAE,mBAAwB;cA2B5B,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBvE,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,UAAU;IAsBlB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,aAAa;YAoBP,KAAK;IA8CnB;;OAEG;YACW,WAAW;IAezB,OAAO,CAAC,WAAW;IAMb,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAuChC"}
@@ -1,4 +1,5 @@
1
- import type { TracingEvent, InitExporterOptions, TracingStorageStrategy } from '@mastra/core/observability';
1
+ import type { TracingEvent, InitExporterOptions } from '@mastra/core/observability';
2
+ import type { TracingStorageStrategy } from '@mastra/core/storage';
2
3
  import type { BaseExporterConfig } from './base.js';
3
4
  import { BaseExporter } from './base.js';
4
5
  interface DefaultExporterConfig extends BaseExporterConfig {
@@ -18,9 +19,9 @@ export declare class DefaultExporter extends BaseExporter {
18
19
  /**
19
20
  * Initialize the exporter (called after all dependencies are ready)
20
21
  */
21
- init(options: InitExporterOptions): void;
22
+ init(options: InitExporterOptions): Promise<void>;
22
23
  /**
23
- * Initialize the resolved strategy once storage is available
24
+ * Initialize the resolved strategy once observability store is available
24
25
  */
25
26
  private initializeStrategy;
26
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/exporters/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,UAAU,qBAAsB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