@mastra/otel-exporter package forwards those spans to any OTLP endpoint — point it at AgentMark and agent runs, model calls, and tool calls arrive normalized. Mastra is a TypeScript framework.
Setup
Point the exporter at AgentMark
Add an
Observability instance with the OTLP exporter to your Mastra app. Use your AgentMark API key and app id from project settings.Run your agent
Run your Mastra agent as usual. Each agent run, model call, and tool call arrives in AgentMark as a span, grouped into a trace. See Traces and logs.
What AgentMark captures
Mastra’s model spans use the OpenTelemetry GenAI conventions — model, token usage, input and output messages, and finish reason — which AgentMark maps onto its normalized trace fields, and token counts feed cost tracking automatically.Next steps
OpenTelemetry
The endpoint, authentication, and GenAI conventions AgentMark reads
Traces and logs
Explore traces once they arrive
Have questions?
Reach out any time:
- Email us at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about our business solutions