PHP Monitoring
PHP monitoring
for Laravel, Symfony and Slim.
Trace every request through your framework, its database queries and outbound HTTP calls. The OpenTelemetry PHP extension hooks into the runtime, and zero-code packages instrument the libraries you already use.
What you see
Traces, metrics and logs from PHP
The opentelemetry extension, installed from PECL, lets the auto-instrumentation packages hook framework and library calls.
Distributed traces
Requests, database queries and HTTP client calls as spans, linked across services.
Metrics
Anything you record with the OpenTelemetry metrics API, exported over OTLP.
Correlated logs
Monolog records carry the active trace, so logs open from the trace that wrote them.
Frameworks and libraries
Each of these has official OpenTelemetry instrumentation. aiAxonIQ receives it over OTLP, so anything the OpenTelemetry project adds for PHP works here too.
- Laravel
- Symfony
- Slim
- PDO
- Guzzle
- PSR-15 middleware
- PSR-18 HTTP clients
- Monolog
Set up
Send PHP telemetry in three steps
The full guide, including sampling and resource attributes, is in the documentation.
1Install
pecl install opentelemetry composer require open-telemetry/sdk open-telemetry/exporter-otlp composer require open-telemetry/opentelemetry-auto-laravelAdd extension=opentelemetry to php.ini. Swap the last package for the one that matches your stack, for example open-telemetry/opentelemetry-auto-symfony or open-telemetry/opentelemetry-auto-slim.
2Configure
export OTEL_PHP_AUTOLOAD_ENABLED=true export OTEL_EXPORTER_OTLP_ENDPOINT="https://app.aiaxoniq.com/otlp" export OTEL_EXPORTER_OTLP_HEADERS="x-license-key=YOUR_LICENSE_KEY" export OTEL_SERVICE_NAME="my-service"3Run
php artisan serve
How the data flows
- 1. Instrument. The OpenTelemetry SDK for PHP records spans, metrics and logs in your process.
- 2. Export. It sends them over OTLP, straight to aiAxonIQ or through an OpenTelemetry Collector you already run.
- 3. Explore. Traces, metrics and logs land in one store, so a slow request opens onto its queries and its log lines.
Because the wire format is OTLP, the same instrumentation works with any OpenTelemetry backend. Moving to aiAxonIQ, or away from it, is an endpoint change.
PHP questions
- Which PHP versions are supported?
- The OpenTelemetry extension and its zero-code packages require PHP 8.0 or later.
- Does it work with PHP-FPM?
- Yes. Load the extension in php.ini and pass the OTEL_ variables to the pool, for example with env[] entries in the pool configuration, so every worker exports.