Documentation Index
Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Mastra
Use the Adaline Mastra integration when you want Mastra agent execution data to flow into Adaline. The package supports two integration styles:AdalineMastraCallbackHandlerfor Mastra execution hooksAdalineMastraExporterfor Mastra observability exporter flows
Prerequisites
Before you start, make sure you have:- An Adaline account.
- A workspace API key — create one under Settings → API keys.
- Your project ID — copy it from Monitor → Copy Project ID.
Install
Initialize Adaline
Create an Adaline client, then initialize a monitor for the target project.For production guidance — buffering, batching, retries, serverless flushing, and graceful shutdown — see Instrument with the Adaline SDK.
Choose an integration path
Use whichever path matches how your Mastra app is instrumented:- attach
AdalineMastraCallbackHandlerif you are adding execution hooks directly to agent runs - configure
AdalineMastraExporterif you are wiring into Mastra observability exporters
Attach the Mastra callback handler
The callback handler exposes Mastra execution hooks throughgetExecutionHooks(). Those hooks can be passed into agent execution calls.
Configure the Mastra exporter
If your Mastra application is already using the observability exporter flow, you can attach the Adaline exporter there instead.Use an existing parent trace or span
Both the callback handler and exporter accept an existing Adaline parent context, so Mastra work can be attached under a trace or span you created earlier.parentTrace or parentSpan, but not both.
What the Mastra integration captures
The Mastra integration is designed to capture Mastra execution structure such as:- root agent executions
- step completions
- iteration completions
- tool calls and tool results
- delegation start and completion events
Next steps
Instrument with the Adaline SDK
Monitor lifecycle, buffering and batching, retries, serverless flushing, and graceful shutdown.
SDK reference
Full class and type reference for the TypeScript and Python SDKs.
All integrations
Browse every framework and AI-provider integration Adaline supports.
View your logs
Open Adaline to see traces and spans land in your project.