Logfire Setup
The simplest Logfire setup uses:LogfireConfigLogfireExporterTelemetry
Minimal Example
Environment Variables
The telemetry examples use:LOGFIRE_TOKENLOGFIRE_OTLP_ENDPOINT
LOGFIRE_TOKEN as the Logfire write token for OTLP telemetry export.
Endpoint Rule
LogfireConfig expects the OTLP base endpoint. Do not pass a full /v1/traces
or /v1/metrics path.
Reference Example
The inline reference example is:examples/A03_Troubleshooting/TelemetryLogfire/run.php
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