Learn how to instrument your PHP application with OpenTelemetry PHP Distro and send telemetry data to an OTLP-compatible backend.
- Have a destination for telemetry data (OTLP endpoint).
- Use a supported Linux and PHP version.
- Do not run another PHP APM or OpenTelemetry agent in the same process.
For supported operating systems and PHP versions, see Supported technologies.
Known runtime and compatibility limitations are described in Limitations.
Download a package for your platform from the project releases and install it.
sudo rpm -ivh <package-file>.rpmsudo dpkg -i <package-file>.debsudo apk add --allow-untrusted <package-file>.apkAt a minimum, set:
OTEL_EXPORTER_OTLP_ENDPOINTOTEL_EXPORTER_OTLP_HEADERS
Example:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://your-otlp-endpoint:443/"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <token>"After installation and configuration, restart PHP processes (for example php-fpm, Apache workers, or long-running CLI workers) so the extension loads.
- Open your observability backend.
- Find your service in traces.
- Generate traffic if no traces are visible yet.
- Verify configuration options in Configuration.
- Check known constraints in Limitations.