Mastra
Instrument AI agents and workflows built with Mastra's TypeScript framework
Mastra is an open-source TypeScript agent framework designed to provide the primitives you need to build AI applications and features. With Mastra, you can build AI agents with memory, function execution capabilities, and chain LLM calls in deterministic workflows.
Tracing Mastra Applications with Arize
Create your Project
If you haven't already, create a project with Mastra:
Installation
Install the OpenInference instrumentation package for Mastra
Environment Variable Configuration
Add your Arize Space ID and API Key, as well as any model API keys you're using:
Basic Configuration
Configure Mastra with telemetry settings to send traces directly to Arize:
Run your Mastra App
What Gets Automatically Traced
Mastra's comprehensive tracing captures:
Agent Operations: All agent generation, streaming, and interaction calls
LLM Interactions: Complete model calls with input/output messages and metadata
Tool Executions: Function calls made by agents with parameters and results
Workflow Runs: Step-by-step workflow execution with timing and dependencies
Memory Operations: Agent memory queries, updates, and retrieval operations
All traces follow OpenTelemetry standards and include relevant metadata such as model parameters, token usage, execution timing, and error details.
Last updated
Was this helpful?