Getting Started
Mastra is a TypeScript framework for building AI-powered applications with pipelines, agents, and workflows. Tracing Mastra with Orq.ai provides comprehensive insights into pipeline execution, agent performance, workflow orchestration, and system reliability to optimize your AI automation workflows.Prerequisites
Before you begin, ensure you have:- An Orq.ai account and API Key
- Node.js 16+ and TypeScript support
- Mastra installed in your project
- API keys for your LLM providers and external services
Install Dependencies
Configure Orq.ai
Set up your environment variables to connect to Orq.ai’s OpenTelemetry collector: Unix/Linux/macOS:Integrations
Default Export
In your Mastra server configuration, enable export tracing the following way The previously set environment variables will be used.
Custom Instrumentation
Mastra supports native OpenTelemetry integration for comprehensive observability.Create an instrumentation.mjs file in your Mastra Project
Enable Telemetry in your Mastra Initialization
All Mastra Pipelines and agents call will be Instrumented and exported to Orq.ai through the OTLP exporter. For more details, see Traces .
LiteLLM OpenAI Agents