auxmoney/opentracing-bundle-monolog
最新稳定版本:v1.2.3
Composer 安装命令:
composer require auxmoney/opentracing-bundle-monolog
包简介
Symfony Opentracing bundle extension for Monolog
关键字:
README 文档
README
This bundle adds a monolog processor to the OpentracingBundle to automatically enrich log contexts with the current span context.
Installation
Prerequisites
This bundle is only an additional plugin and should not be installed independently. See its documentation for more information on installing the OpentracingBundle first.
Require dependencies
After you have installed the OpentracingBundle:
- require the dependencies:
composer req auxmoney/opentracing-bundle-monolog
Enable the bundle
If you are using Symfony Flex, you are all set!
If you are not using it, you need to manually enable the bundle:
- add bundle to your application:
# Symfony 3: AppKernel.php $bundles[] = new Auxmoney\OpentracingMonologBundle\OpentracingMonologBundle();
# Symfony 4+: bundles.php Auxmoney\OpentracingMonologBundle\OpentracingMonologBundle::class => ['all' => true],
Configuration
No configuration is necessary, the Monolog bundle extension will automatically load the provided Processor by tag.
Usage
Whenever a message is logged, the content is extended with extra information of the span context.
[2020-01-10 11:38:03] php.INFO: .... {"exception":"[object] (ErrorException(code: 0) ...."} {"opentracing-context":"{\"UBER-TRACE-ID\":\"15e880402e1a194715e880402e19a3e0:15e880402e19a3e0:0:1\"}"}
Development
Be sure to run
composer run-script quality
every time before you push code changes. The tools run by this script are also run in the CI pipeline.
统计信息
- 总下载量: 809.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-07