Mastra
The @astropods/adapter-mastra package — the same one used to connect a Mastra agent to Astro messaging — auto-wires OpenTelemetry tracing when OTEL_EXPORTER_OTLP_ENDPOINT is set in the deployed container. Model calls, tool calls, and agent steps flow into the dashboard automatically.
Install
Use
Calling serve() registers the agent with the messaging service and configures observability in the same step. The agent’s name is sent as the OpenTelemetry service.name; the platform-injected OTEL_EXPORTER_OTLP_ENDPOINT is used for export. No additional configuration is required.
If your project constructs its own Mastra instance (e.g. for multi-agent workflows), serve() registers Astro’s OpenTelemetry observability alongside any existing observability instances on that Mastra.
Verify
Deploy the agent, send it a message, then open the agent’s detail page in the Astro dashboard. Traces appear within ~30 seconds.
If nothing shows up:
- Confirm
OTEL_EXPORTER_OTLP_ENDPOINTis present in the deployed container. - Check the agent container logs for OpenTelemetry export errors.