@mastra/observability 1.13.0 → 1.14.0-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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mastra/observability
2
2
 
3
+ ## 1.14.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Paused observability uploads after invalid credentials so exporters stop repeatedly sending unauthorized requests. ([#16743](https://github.com/mastra-ai/mastra/pull/16743))
8
+
9
+ - Updated dependencies [[`0cbece9`](https://github.com/mastra-ai/mastra/commit/0cbece9d832cb134a74cdbf3682d390a058215a4), [`7dfe1bc`](https://github.com/mastra-ai/mastra/commit/7dfe1bcfe71d261a6fd6bbf29b1dec49d78fb98f), [`70cb714`](https://github.com/mastra-ai/mastra/commit/70cb7149c8f16f478e15b58498254a53181750a4), [`7f9da22`](https://github.com/mastra-ai/mastra/commit/7f9da22efd5aa595e138a31de55a5f0f2f28b33d)]:
10
+ - @mastra/core@1.37.0-alpha.6
11
+
12
+ ## 1.14.0-alpha.0
13
+
14
+ ### Minor Changes
15
+
16
+ - Support ingesting client-side tool telemetry. Spans, logs, and duration metrics captured by the client SDK during tool execution are forwarded through the observability bus to your existing exporters. Client tool durations are reported via the existing `mastra_tool_duration_ms` metric with a `toolType: 'client'` label to distinguish them from server-side tool durations. ([#16425](https://github.com/mastra-ai/mastra/pull/16425))
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [[`2f5f58a`](https://github.com/mastra-ai/mastra/commit/2f5f58a9a8bb13bcdc6789db221eef7c9bf1ff02)]:
21
+ - @mastra/core@1.37.0-alpha.1
22
+
3
23
  ## 1.13.0
4
24
 
5
25
  ### Minor Changes
@@ -0,0 +1,2 @@
1
+ export declare function generateClientSignalId(): string;
2
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/client/id.ts"],"names":[],"mappings":"AAAA,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Client observability for @mastra/observability.
3
+ *
4
+ * Implements the ClientObservabilityProxy interface from @mastra/core
5
+ * to bridge OTLP/JSON spans and logs returned by client-side execution
6
+ * (via the @mastra/client-js collector) into the Mastra observability
7
+ * bus.
8
+ */
9
+ export { createClientObservabilityProxy, DEFAULT_LIMITS } from './proxy.js';
10
+ export type { ClientObservabilityProxyLimits, CreateClientObservabilityProxyOptions } from './proxy.js';
11
+ export { decodeResourceLogs, decodeResourceSpans, buildExportedLog, buildExportedSpan, otlpSeverityToLogLevel, } from './otlp.js';
12
+ export type { DecodedOtlpLog, DecodedOtlpSpan } from './otlp.js';
13
+ export { formatBaggage, formatTraceparent, parseBaggage, parseTraceparent } from './w3c.js';
14
+ export type { TraceparentParts } from './w3c.js';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzE,YAAY,EAAE,8BAA8B,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AACrG,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzF,YAAY,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Hand-rolled OTLP/JSON decoder for the subset we need to ingest from
3
+ * client-side tool execution.
4
+ *
5
+ * The full OTLP/JSON spec is defined in
6
+ * https://opentelemetry.io/docs/specs/otlp/#otlphttp and the
7
+ * opentelemetry-proto repo. We only consume `ResourceSpans` (for spans)
8
+ * and `ResourceLogs` (for logs). The full message types are large and
9
+ * include backwards-compat fields we never need; this walker reads the
10
+ * fields we care about and ignores the rest.
11
+ *
12
+ * Using `@opentelemetry/otlp-transformer` would pull in the full proto
13
+ * dependency tree (~hundreds of KB) for what amounts to a 100-line walker.
14
+ */
15
+ import type { AnyExportedSpan, EntityType, ExportedLog, LogLevel } from '@mastra/core/observability';
16
+ /**
17
+ * Decoded shape of one span pulled out of an OTLP/JSON ResourceSpans
18
+ * payload. Just enough fields to construct an ExportedSpan and forward
19
+ * it through the bus.
20
+ */
21
+ export interface DecodedOtlpSpan {
22
+ traceId: string;
23
+ spanId: string;
24
+ parentSpanId?: string;
25
+ name: string;
26
+ startTime: Date;
27
+ endTime?: Date;
28
+ attributes?: Record<string, unknown>;
29
+ /** OTLP status code: 0 unset, 1 ok, 2 error */
30
+ statusCode?: number;
31
+ statusMessage?: string;
32
+ }
33
+ export interface DecodedOtlpLog {
34
+ traceId: string;
35
+ spanId?: string;
36
+ timestamp: Date;
37
+ /** OTLP severityText: "INFO", "WARN", etc. */
38
+ severityText?: string;
39
+ /** OTLP severityNumber: 1-24 */
40
+ severityNumber?: number;
41
+ body?: unknown;
42
+ attributes?: Record<string, unknown>;
43
+ }
44
+ /**
45
+ * Walk an OTLP/JSON ResourceSpans payload and return a flat list of
46
+ * decoded spans. Returns an empty array (and never throws) if the
47
+ * payload is malformed.
48
+ */
49
+ export declare function decodeResourceSpans(payload: unknown): DecodedOtlpSpan[];
50
+ export declare function decodeResourceLogs(payload: unknown): DecodedOtlpLog[];
51
+ /**
52
+ * Translate an OTLP severity (text or number) to a Mastra LogLevel.
53
+ *
54
+ * OTEL severity numbers per spec:
55
+ * 1-4 trace, 5-8 debug, 9-12 info, 13-16 warn, 17-20 error, 21-24 fatal.
56
+ */
57
+ export declare function otlpSeverityToLogLevel(text: string | undefined, num: number | undefined): LogLevel;
58
+ /**
59
+ * Convert a decoded OTLP span into the Mastra ExportedSpan shape so it
60
+ * can be emitted via the observability bus.
61
+ *
62
+ * All ingested spans use SpanType.GENERIC because we don't know what
63
+ * the user instrumented inside their client tool. The original span
64
+ * name and attributes are preserved.
65
+ */
66
+ export declare function buildExportedSpan(decoded: DecodedOtlpSpan, options?: {
67
+ entityType?: EntityType;
68
+ entityName?: string;
69
+ isInternal?: boolean;
70
+ }): AnyExportedSpan;
71
+ export declare function buildExportedLog(decoded: DecodedOtlpLog): ExportedLog;
72
+ //# sourceMappingURL=otlp.d.ts.map
@@ -0,0 +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,SAAS,GAAG,QAAQ,CAiBlG;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACnF,eAAe,CAuBjB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,WAAW,CAUrE"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ClientObservabilityProxy implementation for @mastra/observability.
3
+ *
4
+ * Handles the two halves of the client observability flow:
5
+ *
6
+ * - `inject(parentSpan)` (called from request 1) — produces the W3C
7
+ * carrier the server attaches to the outgoing chunk so the client
8
+ * SDK can extract it and parent its child spans/logs correctly.
9
+ *
10
+ * - `receive(payload, parentContext)` (called from request 2 when the
11
+ * client returns) — decodes the OTLP/JSON payload the client sent
12
+ * back, validates that it actually belongs to the parent trace
13
+ * identified by `parentContext`, and forwards each span/log into
14
+ * the observability bus so existing exporters pick them up.
15
+ */
16
+ import type { IMastraLogger } from '@mastra/core/logger';
17
+ import type { ClientObservabilityProxy, ObservabilityInstance } from '@mastra/core/observability';
18
+ /**
19
+ * Hard caps. A misbehaving client could ship arbitrary OTLP; reject
20
+ * payloads that blow past these limits to keep the server safe.
21
+ */
22
+ export interface ClientObservabilityProxyLimits {
23
+ /** Maximum number of spans accepted per receive call. */
24
+ maxSpans: number;
25
+ /** Maximum number of log records accepted per receive call. */
26
+ maxLogs: number;
27
+ /** Maximum total payload size in bytes (JSON.stringify length). */
28
+ maxPayloadBytes: number;
29
+ }
30
+ export declare const DEFAULT_LIMITS: ClientObservabilityProxyLimits;
31
+ export interface CreateClientObservabilityProxyOptions {
32
+ /**
33
+ * Resolves the observability instance to forward into. Called per
34
+ * `receive()` so config selection works the same way as for
35
+ * server-side spans. Returning `undefined` causes the payload to be
36
+ * dropped silently.
37
+ */
38
+ resolveInstance: () => ObservabilityInstance | undefined;
39
+ /** Logger for warnings about dropped/rejected payloads. */
40
+ logger?: IMastraLogger;
41
+ limits?: Partial<ClientObservabilityProxyLimits>;
42
+ }
43
+ export declare function createClientObservabilityProxy(options: CreateClientObservabilityProxyOptions): ClientObservabilityProxy;
44
+ //# sourceMappingURL=proxy.d.ts.map
@@ -0,0 +1 @@
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;AAqKD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qCAAqC,GAC7C,wBAAwB,CAE1B"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Hand-rolled W3C Trace Context and Baggage propagation.
3
+ *
4
+ * The full propagators in `@opentelemetry/core` weigh ~27KB gzipped.
5
+ * The W3C specs (https://www.w3.org/TR/trace-context/, https://www.w3.org/TR/baggage/)
6
+ * are simple text formats; for the small subset we need (parse and
7
+ * format `traceparent`, parse and format `baggage`), hand-rolling is
8
+ * cheaper and avoids adding an OTEL dependency to @mastra/observability.
9
+ */
10
+ export interface TraceparentParts {
11
+ /** Version, currently always "00". */
12
+ version: string;
13
+ /** 32 hex chars. */
14
+ traceId: string;
15
+ /** 16 hex chars. Refers to the parent span this carrier identifies. */
16
+ spanId: string;
17
+ /** 2 hex chars. Bit 0 is the sampled flag. */
18
+ flags: string;
19
+ }
20
+ export declare function parseTraceparent(value: string | undefined): TraceparentParts | null;
21
+ export declare function formatTraceparent(traceId: string, spanId: string, sampled: boolean): string;
22
+ /**
23
+ * Parse a W3C Baggage header value into a Map.
24
+ *
25
+ * Format: `key=value,key2=value2;property=...`
26
+ * Properties (after `;`) are ignored — we don't use them.
27
+ * Values are percent-decoded per the spec.
28
+ */
29
+ export declare function parseBaggage(value: string | undefined): Map<string, string>;
30
+ /**
31
+ * Format a Map into a W3C Baggage header value.
32
+ * Values are percent-encoded.
33
+ */
34
+ export declare function formatBaggage(entries: Map<string, string> | Record<string, string>): string;
35
+ //# sourceMappingURL=w3c.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"w3c.d.ts","sourceRoot":"","sources":["../../src/client/w3c.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,IAAI,CAQnF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAE3F;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAuB3E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAQ3F"}
package/dist/config.d.ts CHANGED
@@ -163,7 +163,7 @@ export declare const samplingStrategySchema: z.ZodDiscriminatedUnion<[z.ZodObjec
163
163
  probability: z.ZodNumber;
164
164
  }, z.core.$strip>, z.ZodObject<{
165
165
  type: z.ZodLiteral<SamplingStrategyType.CUSTOM>;
166
- sampler: z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodAny>], null>, z.ZodBoolean>;
166
+ sampler: z.ZodCustom<(...args: any[]) => unknown, (...args: any[]) => unknown>;
167
167
  }, z.core.$strip>], "type">;
168
168
  /**
169
169
  * Zod schema for SerializationOptions
@@ -190,14 +190,14 @@ export declare const observabilityInstanceConfigSchema: z.ZodObject<{
190
190
  probability: z.ZodNumber;
191
191
  }, z.core.$strip>, z.ZodObject<{
192
192
  type: z.ZodLiteral<SamplingStrategyType.CUSTOM>;
193
- sampler: z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodAny>], null>, z.ZodBoolean>;
193
+ sampler: z.ZodCustom<(...args: any[]) => unknown, (...args: any[]) => unknown>;
194
194
  }, z.core.$strip>], "type">>;
195
195
  exporters: z.ZodOptional<z.ZodArray<z.ZodAny>>;
196
196
  bridge: z.ZodOptional<z.ZodAny>;
197
197
  spanOutputProcessors: z.ZodOptional<z.ZodArray<z.ZodAny>>;
198
198
  includeInternalSpans: z.ZodOptional<z.ZodBoolean>;
199
199
  excludeSpanTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof SpanType>>>;
200
- spanFilter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>>;
200
+ spanFilter: z.ZodOptional<z.ZodCustom<(...args: any[]) => unknown, (...args: any[]) => unknown>>;
201
201
  requestContextKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
202
202
  serializationOptions: z.ZodOptional<z.ZodObject<{
203
203
  maxStringLength: z.ZodOptional<z.ZodNumber>;
@@ -212,10 +212,10 @@ export declare const observabilityInstanceConfigSchema: z.ZodObject<{
212
212
  logging: z.ZodOptional<z.ZodObject<{
213
213
  enabled: z.ZodOptional<z.ZodBoolean>;
214
214
  level: z.ZodOptional<z.ZodEnum<{
215
+ error: "error";
215
216
  debug: "debug";
216
217
  info: "info";
217
218
  warn: "warn";
218
- error: "error";
219
219
  fatal: "fatal";
220
220
  }>>;
221
221
  }, z.core.$strip>>;
@@ -236,14 +236,14 @@ export declare const observabilityConfigValueSchema: z.ZodObject<{
236
236
  probability: z.ZodNumber;
237
237
  }, z.core.$strip>, z.ZodObject<{
238
238
  type: z.ZodLiteral<SamplingStrategyType.CUSTOM>;
239
- sampler: z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodAny>], null>, z.ZodBoolean>;
239
+ sampler: z.ZodCustom<(...args: any[]) => unknown, (...args: any[]) => unknown>;
240
240
  }, z.core.$strip>], "type">>;
241
241
  exporters: z.ZodOptional<z.ZodArray<z.ZodAny>>;
242
242
  bridge: z.ZodOptional<z.ZodAny>;
243
243
  spanOutputProcessors: z.ZodOptional<z.ZodArray<z.ZodAny>>;
244
244
  includeInternalSpans: z.ZodOptional<z.ZodBoolean>;
245
245
  excludeSpanTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof SpanType>>>;
246
- spanFilter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>>;
246
+ spanFilter: z.ZodOptional<z.ZodCustom<(...args: any[]) => unknown, (...args: any[]) => unknown>>;
247
247
  requestContextKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
248
248
  serializationOptions: z.ZodOptional<z.ZodObject<{
249
249
  maxStringLength: z.ZodOptional<z.ZodNumber>;
@@ -258,10 +258,10 @@ export declare const observabilityConfigValueSchema: z.ZodObject<{
258
258
  logging: z.ZodOptional<z.ZodObject<{
259
259
  enabled: z.ZodOptional<z.ZodBoolean>;
260
260
  level: z.ZodOptional<z.ZodEnum<{
261
+ error: "error";
261
262
  debug: "debug";
262
263
  info: "info";
263
264
  warn: "warn";
264
- error: "error";
265
265
  fatal: "fatal";
266
266
  }>>;
267
267
  }, z.core.$strip>>;
@@ -271,7 +271,7 @@ export declare const observabilityRegistryConfigSchema: z.ZodObject<{
271
271
  enabled: z.ZodOptional<z.ZodBoolean>;
272
272
  }, z.core.$strip>>>;
273
273
  configs: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny>, z.ZodNull]>>;
274
- configSelector: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
274
+ configSelector: z.ZodOptional<z.ZodCustom<(...args: any[]) => unknown, (...args: any[]) => unknown>>;
275
275
  sensitiveDataFilter: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
276
276
  sensitiveFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
277
277
  redactionToken: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA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zE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;;;;;;;;;;;;;OAiBG;IACH,mBAAmB,CAAC,EAAE,OAAO,GAAG,0BAA0B,CAAC;CAC5D;AAMD;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;mCAlJO,GAAG,EAAE,KAAK,OAAO,YAAjB,GAAG,EAAE,KAAK,OAAO;2BAiKzD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;kBAO1B,CAAC;AAmCd;;;;GAIG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;uCArNJ,GAAG,EAAE,KAAK,OAAO,YAAjB,GAAG,EAAE,KAAK,OAAO;;;;;;;oDAAjB,GAAG,EAAE,KAAK,OAAO,YAAjB,GAAG,EAAE,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;iBAoOxD,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;uCA1OD,GAAG,EAAE,KAAK,OAAO,YAAjB,GAAG,EAAE,KAAK,OAAO;;;;;;;oDAAjB,GAAG,EAAE,KAAK,OAAO,YAAjB,GAAG,EAAE,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;iBAoP1D,CAAC;AAgBF,eAAO,MAAM,iCAAiC;;;;;wDApQJ,GAAG,EAAE,KAAK,OAAO,YAAjB,GAAG,EAAE,KAAK,OAAO;;;;;;;;;iBA0UxD,CAAC"}
package/dist/default.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Mastra } from '@mastra/core';
2
2
  import { MastraBase } from '@mastra/core/base';
3
3
  import type { IMastraLogger } from '@mastra/core/logger';
4
- import type { CorrelationContext, ConfigSelector, ConfigSelectorOptions, FeedbackInput, ObservabilityEntrypoint, ObservabilityInstance, RecordedTrace, ScoreInput } from '@mastra/core/observability';
4
+ import type { ClientObservabilityProxy, CorrelationContext, ConfigSelector, ConfigSelectorOptions, FeedbackInput, ObservabilityEntrypoint, ObservabilityInstance, RecordedTrace, ScoreInput } from '@mastra/core/observability';
5
5
  import type { ObservabilityRegistryConfig } from './config.js';
6
6
  /**
7
7
  * Top-level observability entrypoint. Manages a registry of ObservabilityInstance
@@ -53,5 +53,15 @@ export declare class Observability extends MastraBase implements ObservabilityEn
53
53
  clear(): void;
54
54
  /** Shut down all registered instances, flushing any pending data. */
55
55
  shutdown(): Promise<void>;
56
+ /**
57
+ * Returns the proxy responsible for client observability (W3C trace
58
+ * context injection + OTLP/JSON payload reception for spans/logs
59
+ * returned from client-side execution).
60
+ *
61
+ * Lazily constructed on first call. Resolves the target observability
62
+ * instance per receive call so config selection works the same way
63
+ * as for server-side spans.
64
+ */
65
+ getClientObservabilityProxy(): ClientObservabilityProxy | undefined;
56
66
  }
57
67
  //# sourceMappingURL=default.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../src/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,aAAa,EAEb,uBAAuB,EAEvB,qBAAqB,EACrB,aAAa,EACb,UAAU,EAEX,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EAA+B,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAuBzF;;;GAGG;AACH,qBAAa,aAAc,SAAQ,UAAW,YAAW,uBAAuB;;gBAIlE,MAAM,EAAE,2BAA2B;IAgJ/C,yFAAyF;IACzF,gBAAgB,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAkCnD,sFAAsF;IACtF,SAAS,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,aAAa,CAAA;KAAE,GAAG,IAAI;I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ACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,QAAQ,EAAE,aAAa,CAAC;KACzB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCjB,iFAAiF;IACjF,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,UAAQ,GAAG,IAAI;IAWxF,yCAAyC;IACzC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAI5D,8CAA8C;IAC9C,kBAAkB,IAAI,qBAAqB,GAAG,SAAS;IAIvD,mDAAmD;IACnD,aAAa,IAAI,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC;IAI3D,gFAAgF;IAChF,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIzC,mEAAmE;IACnE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIlC,qEAAqE;IACrE,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAIjD,8DAA8D;IAC9D,KAAK,IAAI,IAAI;IAIb,qEAAqE;IAC/D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;;;;;;;OAQG;IACH,2BAA2B,IAAI,wBAAwB,GAAG,SAAS;CA2DpE"}
@@ -0,0 +1,25 @@
1
+ import type { IMastraLogger } from '@mastra/core/logger';
2
+ export declare class AuthFailureError extends Error {
3
+ readonly status: number;
4
+ constructor(status: number, cause?: unknown);
5
+ }
6
+ export declare function isAuthFailureError(error: unknown): error is AuthFailureError;
7
+ export declare function fetchWithAuthFailureHandling(url: string, options: RequestInit, maxRetries: number): Promise<void>;
8
+ export declare class AuthFailureCooldown {
9
+ private readonly exporterName;
10
+ private readonly getLogger;
11
+ private failureCount;
12
+ private cooldownUntilMs;
13
+ private droppedEventsDuringCooldown;
14
+ constructor(exporterName: string, getLogger: () => IMastraLogger);
15
+ private shouldDropEvents;
16
+ dropEventIfCoolingDown(): boolean;
17
+ dropEventsIfCoolingDown(count: number): boolean;
18
+ reset(): number;
19
+ recordFailure(args: {
20
+ status: number;
21
+ failedSignals: string[];
22
+ droppedBatchSize: number;
23
+ }): void;
24
+ }
25
+ //# sourceMappingURL=auth-failure-cooldown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-failure-cooldown.d.ts","sourceRoot":"","sources":["../../src/exporters/auth-failure-cooldown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASzD,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAK5C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAMD,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED,qBAAa,mBAAmB;IAM5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAN5B,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,2BAA2B,CAAK;gBAGrB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,aAAa;IAGjD,OAAO,CAAC,gBAAgB;IAIxB,sBAAsB,IAAI,OAAO;IAIjC,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAS/C,KAAK,IAAI,MAAM;IAUf,aAAa,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,EAAE,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CAwBjG"}
@@ -29,6 +29,7 @@ export interface CloudExporterConfig extends BaseExporterConfig {
29
29
  export declare class CloudExporter extends BaseExporter {
30
30
  name: string;
31
31
  private readonly cloudConfig;
32
+ private readonly authFailureCooldown;
32
33
  private buffer;
33
34
  private flushTimer;
34
35
  private inFlightFlushes;
@@ -1 +1 @@
1
- {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/exporters/cloud.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AA+LD;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,IAAI,SAAyC;IAE7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgC;IAC5D,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,eAAe,CAA4B;gBAEvC,MAAM,GAAE,mBAAwB;cAgE5B,mBAAmB,CAAC,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O,CAAC,YAAY;IAMpB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,cAAc;YAMR,mBAAmB;IAYjC,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,aAAa;YAoBP,WAAW;IAyEzB;;OAEG;YACW,WAAW;YAuBX,gBAAgB;IAmC9B,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAiChC"}
@@ -17,6 +17,7 @@ export interface MastraPlatformExporterConfig extends BaseExporterConfig {
17
17
  export declare class MastraPlatformExporter extends BaseExporter {
18
18
  name: string;
19
19
  private readonly platformConfig;
20
+ private readonly authFailureCooldown;
20
21
  private buffer;
21
22
  private flushTimer;
22
23
  private inFlightFlushes;
@@ -1 +1 @@
1
- {"version":3,"file":"mastra-platform.d.ts","sourceRoot":"","sources":["../../src/exporters/mastra-platform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,WAAW,4BAA6B,SAAQ,kBAAkB;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACx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