PHP auto-instrumentation needs a PECL extension that hooks function calls, plus the Composer packages for the SDK. With both present, Laravel and Symfony requests, PDO queries and Guzzle calls are traced without code changes.

Install

Swap the last package for opentelemetry-auto-symfony, -auto-slim or -auto-psr18 depending on your framework. Verify the extension loaded with php -m | grep opentelemetry.

Configure

OTEL_PHP_AUTOLOAD_ENABLED=true is the switch that actually turns auto-instrumentation on. Everything else can be correct and nothing will be exported without it.

Under PHP-FPM

Shell exports do not reach FPM workers. Set them in the pool config instead:

Custom spans