Skip to content

release: @traceai/mastra v0.2.0 — Mastra v1 observability#183

Merged
NVJKKartik merged 3 commits into
mainfrom
dev
Jun 3, 2026
Merged

release: @traceai/mastra v0.2.0 — Mastra v1 observability#183
NVJKKartik merged 3 commits into
mainfrom
dev

Conversation

@NVJKKartik

Copy link
Copy Markdown
Contributor

Promotes the Mastra v1 observability work from `dev` to `main`.

What's in this release

`@traceai/mastra` 0.1.0 → 0.2.0 (merged via #182)

  • Mastra v1 support — `createFIObservability` / `createFIMastraExporter` wire Future AGI into the new `@mastra/observability` pipeline. Mastra v1 removed the `telemetry:` config the old `FITraceExporter` relied on, so the previous integration silently exported nothing.
  • gen_ai convention mapping — each span gets a `gen_ai.span.kind` (via the `FISpanKind` constants from `@traceai/fi-semantic-conventions`) and `input.value` / `output.value` enrichment, so traces render fully in the FI UI (previously only the root span carried attributes / everything showed as `unknown`).
  • Legacy split — the v0.x `FITraceExporter` moved to the `@traceai/mastra/legacy` subpath.
  • Added `CHANGELOG.md`, 33 unit tests (enrichment + factory), removed orphaned `debug.ts`.

Verification

  • Typecheck clean, 33/33 tests pass.
  • E2E validated against prod: spans land under the project with kind = AGENT/LLM/TOOL and input/output populated.

Scope note

`dev` is ahead of `main` by exactly the 3 Mastra commits — this PR introduces only the `traceai_mastra` package + lockfile. main's `#165` otel shutdown hotfix is not affected (dev never touched `otel.py`, so the three-dot merge preserves it).

Hygiene follow-up (separate): main's `#165 fix(otel): exporter shutdown data loss` is not yet back-merged into `dev`. Worth a `main → dev` sync after this lands so dev doesn't keep regressing that file.

NVJKKartik and others added 3 commits June 3, 2026 15:27
…onventions

Mastra v1 (>=1.16) removed the `telemetry:` config key that the old FITraceExporter
plugged into, so traces silently stopped exporting. This adds a v1-native path:

- createFIObservability() / createFIMastraExporter(): wire Future AGI into Mastra's
  v1 `observability` API with the correct collector host (api.futureagi.com),
  x-api-key/x-secret-key auth, and project_name/project_type resource attributes
  (without project_name the trace is accepted but no project is created).
- FIMastraSpanExporter: reuses @mastra/otel-exporter's SpanConverter, then enriches
  each span with gen_ai.span.kind (mapped from the Mastra span type) and
  input.value/output.value, so spans render with the right kind (not "unknown")
  and their I/O in Future AGI.
- Excludes MODEL_CHUNK streaming spans by default.
- Legacy v0.x FITraceExporter/isFISpan moved to the `@traceai/mastra/legacy`
  subpath so v1 users don't pull @traceai/vercel.
- Adds unit tests for the enrichment and factory/resolver logic.
feat(mastra): support Mastra v1 observability + map spans to gen_ai conventions
@NVJKKartik NVJKKartik merged commit 3ef6e5d into main Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants