Skip to main content
Export traces from Mastra agents to TraceRoot using the @traceroot-ai/mastra exporter package. This integrates with Mastra’s built-in OpenTelemetry observability system.

Setup

Install the exporter alongside your Mastra dependencies:
Configure TraceRoot as an exporter in your Mastra instance:

Usage

Once configured, all agent calls are traced automatically:

What Gets Captured

Run the example

Clone the repo and run a complete agent end-to-end.

TypeScript

Run the TypeScript example