netolabs / openmetrics-bundle
Symfony 扩展包,用于将应用遥测数据从您的应用导出到 Prometheus
v1.0.0
2020-11-05 07:34 UTC
Requires
- php: ^7.1
- ext-apcu: *
- doctrine/dbal: ^2.6
- endclothing/prometheus_client_php: ^1.0
- symfony/config: ^3.4|^4.0|^5.0
- symfony/dependency-injection: ^3.4|^4.0|^5.0
- symfony/http-kernel: ^3.4|^4.0|^5.0
README
Symfony 扩展包,用于将应用遥测数据从您的应用导出到 Prometheus。
安装
下载扩展包
composer require netolabs/openmetrics-bundle
将扩展包添加到 AppKernel.php
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Neto\OpenmetricsBundle\NetoOpenmetricsBundle(), ); } }
将配置添加到 config.yml
neto_openmetrics: namespace: neto_ecommerce ignored_routes: []
为您的 /metrics 端点添加 routes.yml
neto_openmetrics: resource: '@NetoOpenmetricsBundle/Resources/config/routes.yml' prefix: /