@traceroot-ai/mastra
v0.1.1
Published
Traceroot observability exporter for Mastra
Downloads
26
Maintainers
Readme
@traceroot-ai/mastra
TraceRoot observability exporter for Mastra. Sends Mastra agent traces to TraceRoot with full span-type semantics (agent, tool, LLM).
Installation
npm install @traceroot-ai/mastra @mastra/observabilityUsage
import { Mastra } from "@mastra/core";
import { Observability } from "@mastra/observability";
import { TraceRootExporter } from "@traceroot-ai/mastra";
export const mastra = new Mastra({
agents: { myAgent },
observability: new Observability({
configs: {
traceroot: {
serviceName: "my-service",
exporters: [
new TraceRootExporter({
apiKey: process.env.TRACEROOT_API_KEY,
}),
],
},
},
}),
});Configuration
| Option | Default | Description |
|---|---|---|
| apiKey | TRACEROOT_API_KEY env | TraceRoot API key |
| baseUrl | https://app.traceroot.ai | TraceRoot backend URL (TRACEROOT_HOST_URL env) |
| realtime | false | Flush after every span (useful for short-lived scripts) |
| disableBatch | false | Use SimpleSpanProcessor instead of batch |
| batchSize | 512 | Max spans per export batch |
| timeoutMillis | 30000 | OTLP export timeout |
Documentation
See the TraceRoot Docs for details.
