@mastra/observability 1.0.0-beta.2 → 1.0.0-beta.3

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.
@@ -9,12 +9,6 @@
9
9
  */
10
10
  import { SpanType } from '@mastra/core/observability';
11
11
  import type { Span, EndSpanOptions, ErrorSpanOptions, TracingContext, UpdateSpanOptions } from '@mastra/core/observability';
12
- /**
13
- * Manages MODEL_STEP and MODEL_CHUNK span tracking for streaming Model responses.
14
- *
15
- * Should be instantiated once per MODEL_GENERATION span and shared across
16
- * all streaming steps (including after tool calls).
17
- */
18
12
  export declare class ModelSpanTracker {
19
13
  #private;
20
14
  constructor(modelSpan?: Span<SpanType.MODEL_GENERATION>);
@@ -1 +1 @@
1
- {"version":3,"file":"model-tracing.d.ts","sourceRoot":"","sources":["../src/model-tracing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAGpC;;;;;GAKG;AACH,qBAAa,gBAAgB;;gBAQf,SAAS,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAIvD;;;OAGG;IACH,iBAAiB,IAAI,cAAc;IAMnC;;OAEG;IACH,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAIjF;;OAEG;IACH,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAIxE;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI;IA4O7E;;;;;OAKG;IACH,UAAU,CAAC,CAAC,SAAS;QAAE,WAAW,EAAE,QAAQ,CAAA;KAAE,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC;CAyE9D"}
1
+ {"version":3,"file":"model-tracing.d.ts","sourceRoot":"","sources":["../src/model-tracing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAqBpC,qBAAa,gBAAgB;;gBAcf,SAAS,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAqBvD;;;OAGG;IACH,iBAAiB,IAAI,cAAc;IAMnC;;OAEG;IACH,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAIjF;;OAEG;IACH,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAIxE;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI;IA4V7E;;;;;OAKG;IACH,UAAU,CAAC,CAAC,SAAS;QAAE,WAAW,EAAE,QAAQ,CAAA;KAAE,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC;CAqG9D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Composable Tracing Options Builder
3
+ */
4
+ import type { TracingOptions } from '@mastra/core/observability';
5
+ /**
6
+ * A function that updates TracingOptions.
7
+ */
8
+ export type TracingOptionsUpdater = (options: TracingOptions) => TracingOptions;
9
+ /**
10
+ * Builds TracingOptions by composing one or more updater functions.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * import { buildTracingOptions } from '@mastra/observability';
15
+ * import { withLangfusePrompt } from '@mastra/langfuse';
16
+ *
17
+ * const prompt = await langfuse.getPrompt('my-prompt');
18
+ *
19
+ * const agent = new Agent({
20
+ * defaultGenerateOptions: {
21
+ * tracingOptions: buildTracingOptions(withLangfusePrompt(prompt)),
22
+ * },
23
+ * });
24
+ * ```
25
+ */
26
+ export declare function buildTracingOptions(...updaters: TracingOptionsUpdater[]): TracingOptions;
27
+ //# sourceMappingURL=tracing-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing-options.d.ts","sourceRoot":"","sources":["../src/tracing-options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,cAAc,KAAK,cAAc,CAAC;AAEhF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,QAAQ,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAExF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/observability",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "Core observability package for Mastra - includes tracing and scoring features",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,8 +35,8 @@
35
35
  "typescript": "^5.8.3",
36
36
  "vitest": "4.0.12",
37
37
  "@internal/types-builder": "0.0.28",
38
- "@internal/lint": "0.0.53",
39
- "@mastra/core": "1.0.0-beta.6"
38
+ "@mastra/core": "1.0.0-beta.7",
39
+ "@internal/lint": "0.0.53"
40
40
  },
41
41
  "dependencies": {
42
42
  "zod": "^3.25.76"