open-telemetry / sdk-configuration
OpenTelemetry PHP 的 SDK 配置。
0.0.3
2024-07-22 14:40 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: >= 0.2.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
This package is auto-updated.
Last update: 2024-08-26 23:32:12 UTC
README
安装
composer require open-telemetry/sdk-configuration
使用
从 配置文件 初始化
$configuration = Configuration::parseFile(__DIR__ . '/kitchen-sink.yaml'); $sdkBuilder = $configuration->create();
性能考虑
解析和处理配置相对昂贵。在无共享设置下运行时,强烈建议提供 $cacheFile
参数。
$configuration = Configuration::parseFile( __DIR__ . '/kitchen-sink.yaml', __DIR__ . '/var/cache/opentelemetry.php', ); $sdkBuilder = $configuration->create();
贡献
此存储库是一个只读的 git 子树分支。要贡献,请参阅主要的 OpenTelemetry PHP 单一存储库。