This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
This is an OpenTelemetry auto-instrumentation package for Symfony framework applications.
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.
- OpenTelemetry extension
- OpenTelemetry SDK and exporters (required to actually export traces)
The following features are supported:
- root span creation (
Symfony\Component\HttpKernel\HttpKernel::handlehook) - context propagation
- HttpClient client span creation (one span per request, even when the client is decorated or a decorator rewrites the request URL:
ScopingHttpClient,UriTemplateHttpClient) - HTTPClient context propagation
- Message Bus span creation
- Message Transport span creation
When a request URL is relative, the client resolves it against its base_uri option while it sends the request.
url.full and peer.service are then updated from the response info once the request has started, so a sampler only
sees the URL as it was requested. Credentials in url.full are redacted.
$ composer require open-telemetry/opentelemetry-auto-symfonyFrom Symfony subdirectory:
$ composer install
$ ./vendor/bin/phpunit testsThe extension can be disabled via runtime configuration:
OTEL_PHP_DISABLED_INSTRUMENTATIONS=symfony