This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.
Auto-instrumentation hooks are registered via composer, and spans will automatically be created.
The extension can be disabled via runtime configuration:
OTEL_PHP_DISABLED_INSTRUMENTATIONS=laravelBy default, log context is JSON-encoded into a single context attribute. This can make it difficult to search for specific context values in observability backends like SigNoz.
To flatten log context into individual, searchable attributes, enable:
OTEL_PHP_LARAVEL_LOG_ATTRIBUTES_FLATTEN=trueDefault behavior (off):
context: {"http":{"method":"GET","path":"/users"},"user_id":"123"}
With flattening enabled:
http.method: GET
http.path: /users
user_id: 123
Nested arrays are flattened using dot notation, making each value individually searchable in your observability backend.