Skip to main content

Mastra traces

@evalgate/sdk/integrations/mastra provides an exporter for Mastra observability. Add it to your observability configuration next to any exporter you already use.
The exporter reads EVALGATE_API_KEY (a key with traces:write) unless you pass apiKey.

What is sent

The exporter keeps ended spans and sends a trace to /api/otel/v1/traces when its root span ends. It sends the span name, type, timing and parent link, and: Prompts, instructions, inputs, outputs, tool payloads and error messages are never sent. A token count Mastra did not report is left out, not sent as zero. Mastra’s own OpenTelemetry exporter also works: send its spans to /api/otel/v1/traces, or use a collector.

Status

Tested against the ObservabilityExporter interface of @mastra/core 1.83.0 with fixture spans. No live run has been recorded yet, so the adapter is fixture_qualified in Integration adapters.