Integrating Agno with Logfire
Logfire is Pydantic’s observability platform that provides comprehensive tracing and monitoring for AI applications. By integrating Agno with Logfire, you can utilize OpenInference to send traces and gain insights into your agent’s performance.Prerequisites
-
Install Dependencies
Ensure you have the necessary packages installed:
-
Setup Logfire Account
- Sign up for an account at Logfire.
- Obtain your write token from the Logfire dashboard.
-
Set Environment Variables
Configure your environment with the Logfire write token:
Sending Traces to Logfire
This example demonstrates how to instrument your Agno agent with OpenInference and send traces to Logfire.Notes
- Environment Variables: Ensure your environment variables are correctly set for the write token and OTLP endpoint.
- Data Regions: Adjust the
OTEL_EXPORTER_OTLP_ENDPOINTfor your data region. Available regions include:https://logfire-us.pydantic.devfor the US regionhttps://logfire-eu.pydantic.devfor the EU region
- Logfire Dashboard: View your traces and monitor performance at Logfire Dashboard