Integrations / Mastra

Trace Mastra agents and workflows

To trace Mastra with Tracify, wrap an agent call with traceAgent in the TypeScript SDK, or export Mastra's OpenTelemetry traces to Tracify over OTLP.

Your code

Mastra

Tracify

One run.

  • 01One trace per agent or workflow run
  • 02Tool calls and results
  • 03Model calls with tokens and cost
  • 04Errors and retries

Setup

A few lines.

typescript
import { traceAgent } from "tracify-sdk";

const run = traceAgent(async (input: string) => {
  const result = await mastraAgent.generate(input);
  return result.text;
}, { name: "mastra-agent" });

Full details in the documentation. All integrations are listed on the integrations page.

Does Mastra work with the Tracify TypeScript SDK?
Yes. Mastra runs as ordinary server-side TypeScript, so traceAgent can wrap its calls, and OTLP export works too.

Send your first trace.

Free to start.