open-telemetry / opentelemetry-auto-symfony
OpenTelemetry auto-instrumentation for Symfony
1.0.0beta30
2024-10-22 19:53 UTC
Requires
- php: ^8.0
- ext-opentelemetry: *
- open-telemetry/api: ^1.0
- open-telemetry/sem-conv: ^1.24
- symfony/http-client-contracts: *
- symfony/http-kernel: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- open-telemetry/opentelemetry-propagation-server-timing: *
- open-telemetry/opentelemetry-propagation-traceresponse: *
- open-telemetry/sdk: ^1.0
- phan/phan: ^5.0
- php-http/mock-client: *
- phpstan/phpstan: ^1.1
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.18.4
- symfony/http-client: ^5.4||^6.0
- symfony/messenger: ^5.4||^6.0
- vimeo/psalm: ^5.0
Suggests
- open-telemetry/opentelemetry-propagation-server-timing: Automatically propagate the context to the client through server-timing headers.
- open-telemetry/opentelemetry-propagation-traceresponse: Automatically propagate the context to the client through trace-response headers.
This package is auto-updated.
Last update: 2024-11-24 02:33:39 UTC
README
This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
OpenTelemetry Symfony auto-instrumentation
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.
Requirements
- OpenTelemetry extension
- OpenTelemetry SDK and exporters (required to actually export traces)
Overview
The following features are supported:
- root span creation (
Symfony\Component\HttpKernel\HttpKernel::handle
hook) - context propagation
- HttpClient client span creation
- HTTPClient context propagation
- Message Bus span creation
- Message Transport span creation
Installation via composer
$ composer require open-telemetry/opentelemetry-auto-symfony
Installing dependencies and executing tests
From Symfony subdirectory:
$ composer install $ ./vendor/bin/phpunit tests
Configuration
The extension can be disabled via runtime configuration:
OTEL_PHP_DISABLED_INSTRUMENTATIONS=symfony