Logfire Setup
The simplest Logfire setup uses:LogfireConfigLogfireExporterTelemetry
Minimal Example
Environment Variables
The example helpers look for:LOGFIRE_TOKENLOGFIRE_API_TOKENLOGFIRE_OTLP_ENDPOINTLOGFIRE_BASE_URL
examples/_support/logfire.php
Endpoint Rule
LogfireConfig expects the OTLP base endpoint. Do not pass a full /v1/traces
or /v1/metrics path.
The helper in examples/_support/logfire.php strips those suffixes if present.
Agent Runtime Example
The working agent example is:examples/D05_AgentTroubleshooting/TelemetryLogfire/run.php
Subagent Example
For nested parent and child traces, see:examples/D05_AgentTroubleshooting/SubagentTelemetryLogfire/run.php
Notes
LogfireExporterrequires eitherLogfireConfigor a custom transport- service name comes from
LogfireConfig::serviceName() - if export fails with a 4xx response, check the token and endpoint first