open-telemetry / sdk-configuration
SDK configuration for OpenTelemetry PHP.
0.0.5
2024-10-02 12:06 UTC
Requires
- php: ^8.1
- open-telemetry/context: ^1.0
- open-telemetry/sdk: ^1.0
- symfony/config: ^5.4 || ^6.4 || ^7.0
- tbachert/spi: ^1.0.1
Suggests
- ext-yaml: Allows loading config from yaml files
- symfony/yaml: Allows loading config from yaml files
- tbachert/spi: Allows defining and loading component providers from composer.json extra.spi
README
Installation
composer require open-telemetry/sdk-configuration
Usage
Initialization from configuration file
$configuration = Configuration::parseFile(__DIR__ . '/kitchen-sink.yaml'); $sdkBuilder = $configuration->create();
Performance considerations
Parsing and processing the configuration is rather expensive. It is highly recommended to provide the $cacheFile
parameter when running in a shared-nothing setup.
$configuration = Configuration::parseFile( __DIR__ . '/kitchen-sink.yaml', __DIR__ . '/var/cache/opentelemetry.php', ); $sdkBuilder = $configuration->create();
Contributing
This repository is a read-only git subtree split. To contribute, please see the main OpenTelemetry PHP monorepo.