【文件属性】:
文件名称:opentracing-php:适用于PHP的OpenTracing API
文件大小:37KB
文件格式:ZIP
更新时间:2021-05-28 18:31:40
php opentracing distributed-tracing PHP
适用于PHP的OpenTracing API
用于OpenTracing APIPHP库。
必读
为了了解图书馆,首先必须熟悉和更具体。
安装
可以通过Composer安装OpenTracing-PHP:
composer require opentracing/opentracing
用法
使用该库时,您实际上只需要担心几个关键的抽象: Tracer::startActiveSpan和Tracer::startSpan方法, Span接口, Scope接口以及在引导时绑定Tracer 。 以下是代码片段,展示了一些重要的用例:
单例初始化
最简单的起点是设置全局跟踪器。 尽早执行以下操作:
use OpenTracing \ GlobalTracer ;
GlobalTracer :: set ( new MyTracerImplementation ());
根据现有请求创建跨
【文件预览】:
opentracing-php-master
----.github()
--------ISSUE_TEMPLATE.md(897B)
--------PULL_REQUEST_TEMPLATE.md(997B)
----.travis()
--------php.ini(72B)
----phpstan.neon(43B)
----src()
--------OpenTracing()
----CONTRIBUTING.md(2KB)
----.travis.yml(311B)
----LICENSE(11KB)
----phpunit.xml(933B)
----README.md(9KB)
----tests()
--------OpenTracing()
----.gitignore(49B)
----composer.json(1013B)