logfire_via_openinference.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export environment variables
4
Choose the Logfire region
Set
OTEL_EXPORTER_OTLP_ENDPOINT in the code to the endpoint for your Logfire project’s US or EU region. The source enables the EU endpoint by default.5
Run the example
Save the code above as
logfire_via_openinference.py, then run: