Download the PHP package yuanlj-tea/jaeger without Composer
On this page you can find all versions of the php package yuanlj-tea/jaeger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yuanlj-tea/jaeger
More information about yuanlj-tea/jaeger
Files in yuanlj-tea/jaeger
Package jaeger
Short Description Jaeger Bindings for PHP OpenTracing API
License MIT
Informations about the package jaeger
Jaeger Bindings for PHP OpenTracing API
This is a client-side library that can be used to instrument PHP apps for distributed trace collection, and to send those traces to Jaeger. See the OpenTracing PHP API for additional detail.
Contributing and Developing
Please see CONTRIBUTING.md.
Installation
Jaeger client can be installed via Composer:
Getting Started
Samplers
List of supported samplers, for more info about samplers, please read Jaeger Sampling guide.
Const sampler
This sampler either samples everything, or nothing.
Configuration
Probabilistic sampler
This sampler samples request by given rate.
Configuration
Rate limiting sampler
Samples maximum specified number of traces (requests) per second.
Requirements
psr/cache
PSR-6 cache component to store and retrieve sampler state between requests. Cache component is passed toJaeger\Config
trough its constructor.hrtime()
function, that can retrieve time in nanoseconds. You need eitherphp 7.3
or PECL/hrtime extension.
Configuration
Dispatch mode
The library supports 3 ways of sending data to Jaeger Agent:
Zipkin.thrift
over Compact protocol (socket - UDP) - defaultJaeger.thrift
over Binary protocol (socket - UDP)Jaeger.thrift
over Binary protocol (HTTP)
If you want to enable "Jaeger.thrift
over Binary protocol" one or other, than
you need to set dispatch_mode
config option or JAEGER_DISPATCH_MODE
env
variable.
Allowed values for dispatch_mode
are:
jaeger_over_binary_udp
jaeger_over_binary_http
zipkin_over_compact_udp
There are 3 constants available, so it is better to use them:
A possible config with custom dispatch_mode
can look like this:
The full example you can see at examples
directory.
By default, for each dispatch_mode
there is default reporting_port
config value. Table with
default values you can see below:
dispatch_mode |
default reporting_port |
---|---|
ZIPKIN_OVER_COMPACT_UDP | 5775 |
JAEGER_OVER_BINARY_UDP | 6832 |
JAEGER_OVER_BINARY_HTTP | 14268 |
IPv6
In case you need IPv6 support you need to set ip_version
Config variable.
By default, IPv4 is used. There is an alias Config::IP_VERSION
which you can use
as an alternative to raw ip_version
.
Example:
or
Testing
Tests are located in the tests
directory. See tests/README.md.
Roadmap
License
MIT License.
All versions of jaeger with dependencies
ext-sockets Version *
opentracing/opentracing Version ^1.0
packaged/thrift Version ^0.13
psr/cache Version ^1.0
psr/log Version ^1.0