open-telemetry / opentelemetry-instrumentation-installer
OpenTelemetry 自动仪表化安装程序
0.0.6
2023-08-23 22:02 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
README
此目录包含两个脚本,这些脚本有助于安装自动仪表化支持和运行应用程序。
第一个脚本 install-otel-instrumentation
将安装自动仪表化所需的全部依赖项。第二个脚本 run-with-otel-instrumentation
负责设置一些环境变量(这些变量是导出跟踪到后端所必需的),并运行应用程序。
安装脚本有两个模式
- 基本(将安装默认设置)
- 高级(交互式模式,您将控制整个过程)
示例工作流程
本节展示了如何安装和运行使用 Slim 框架的自动仪表化应用程序。要生成应用程序,我们遵循以下步骤: https://slim.php.ac.cn/。
composer create-project slim/slim-skeleton:dev-master slimauto
cd slimauto
composer require open-telemetry/opentelemetry-instrumentation-installer
./vendor/bin/install-otel-instrumentation basic beta
./vendor/bin/run-with-otel-instrumentation php -S localhost:8080 -t public public/index.php