PHPackages                             sablesoft/jaeger-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sablesoft/jaeger-php

ActiveLibrary

sablesoft/jaeger-php
====================

php client for jaeger

v2.3.0(6y ago)0760Apache-2.0PHPPHP &gt;=5.6.0

Since Sep 19Pushed 6y agoCompare

[ Source](https://github.com/sablesoft/jaeger-php)[ Packagist](https://packagist.org/packages/sablesoft/jaeger-php)[ RSS](/packages/sablesoft-jaeger-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (34)Used By (0)

[![Build Status](https://camo.githubusercontent.com/8af401c6a215ebea87888f3c4f7bfa81368d51cccb5c483ffca963f6971b7188/68747470733a2f2f7472617669732d63692e636f6d2f6a756b796c696e2f6a61656765722d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/jukylin/jaeger-php)[![Minimum PHP Version](https://camo.githubusercontent.com/4cbdbfeca62402b9ca3d48503f2bf66fc9809569bcd6de47196d39fecff71e72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/cea7f9f03a2ba020aef891ad619ed47396a197d9e0a3a3b0c44c0d1ca1b09536/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a756b796c696e2f6a61656765722d7068702e737667)](https://github.com/jukylin/jaeger-php/blob/master/LICENSE)[![Coverage Status](https://camo.githubusercontent.com/b44a0e704f84576dbf74ab564000a06882e866b1dec13d73de50c1a862f3a1dd/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6a756b796c696e2f6a61656765722d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/jukylin/jaeger-php?branch=master)

jaeger-php
==========

[](#jaeger-php)

principle of Distributed Tracing
--------------------------------

[](#principle-of-distributed-tracing)

[![](https://camo.githubusercontent.com/335293840e2368826d6c59734061bbb7dbdd9d2b9463df7e6f3f5806063e5984/68747470733a2f2f75706c6f61642e63632f692f4f68736a41302e6a7067)](https://camo.githubusercontent.com/335293840e2368826d6c59734061bbb7dbdd9d2b9463df7e6f3f5806063e5984/68747470733a2f2f75706c6f61642e63632f692f4f68736a41302e6a7067)

install
-------

[](#install)

> install via composer

> vim composer.json

```
{
  "minimum-stability": "dev",
  "require":           {
    "jukylin/jaeger-php" : "^2.0",
    "opentracing/opentracing":"1.0.0-beta5"
  }
}

```

> composer update

Init Jaeger-php
---------------

[](#init-jaeger-php)

```
$config = Config::getInstance();
$tracer = $config->initTracer('example', '0.0.0.0:6831');

```

128bit
------

[](#128bit)

```
$config->gen128bit();

```

Extract from Superglobals
-------------------------

[](#extract-from-superglobals)

```
$spanContext = $tracer->extract(Formats\TEXT_MAP, $_SERVER);

```

Start Span
----------

[](#start-span)

```
$serverSpan = $tracer->startSpan('example HTTP', ['child_of' => $spanContext]);

```

Distributed context propagation
-------------------------------

[](#distributed-context-propagation)

```
$serverSpan->addBaggageItem("version", "2.0.0");

```

Inject into Superglobals
------------------------

[](#inject-into-superglobals)

```
$clientTrace->inject($clientSapn1->spanContext, Formats\TEXT_MAP, $_SERVER);

```

Tags and Log
------------

[](#tags-and-log)

```
//can search in Jaeger UI
$span->setTag('http.status', "200");

//log record
$span->log(['error' => "HTTP request timeout"]);

```

Close Tracer
------------

[](#close-tracer)

```
$config->setDisabled(true);

```

Zipkin B3 Propagation
---------------------

[](#zipkin-b3-propagation)

> not support `Distributed context propagation `

```
$config::$propagator = \Jaeger\Constants\PROPAGATOR_ZIPKIN;

```

finish span and flush Tracer
----------------------------

[](#finish-span-and-flush-tracer)

```
$span->finish();
$config->flush();

```

more example
------------

[](#more-example)

- [HTTP](https://github.com/jukylin/jaeger-php/blob/master/example/HTTP.php)
- [Hprose](https://github.com/jukylin/blog/blob/master/Uber%E5%88%86%E5%B8%83%E5%BC%8F%E8%BF%BD%E8%B8%AA%E7%B3%BB%E7%BB%9FJaeger%E4%BD%BF%E7%94%A8%E4%BB%8B%E7%BB%8D%E5%92%8C%E6%A1%88%E4%BE%8B%E3%80%90PHP%20%20%20Hprose%20%20%20Go%E3%80%91.md#%E8%B7%A8%E8%AF%AD%E8%A8%80%E8%B0%83%E7%94%A8%E6%A1%88%E4%BE%8B)
- [Istio](https://github.com/jukylin/jaeger-php/blob/master/example/README.md)

Features
--------

[](#features)

- Transports

    - via Thrift over UDP
- Sampling

    - ConstSampler
    - ProbabilisticSampler

Reference
---------

[](#reference)

[OpenTracing](http://opentracing.io/)

[Jaeger](https://uber.github.io/jaeger/)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 93.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~46 days

Recently: every ~24 days

Total

17

Last Release

2411d ago

Major Versions

v1.0.3 → v2.0.0-beta2018-01-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d9b0f205c28816c7412e64ffc94536e0c7e796bcf1b2066caea1c6167cb2c0f?d=identicon)[sablesoft](/maintainers/sablesoft)

---

Top Contributors

[![jky-yy](https://avatars.githubusercontent.com/u/185590763?v=4)](https://github.com/jky-yy "jky-yy (188 commits)")[![gitsrc](https://avatars.githubusercontent.com/u/34047788?v=4)](https://github.com/gitsrc "gitsrc (3 commits)")[![monteiro](https://avatars.githubusercontent.com/u/74459?v=4)](https://github.com/monteiro "monteiro (3 commits)")[![vyuldashev](https://avatars.githubusercontent.com/u/1809081?v=4)](https://github.com/vyuldashev "vyuldashev (2 commits)")[![corerman](https://avatars.githubusercontent.com/u/7157314?v=4)](https://github.com/corerman "corerman (1 commits)")[![ldjdd](https://avatars.githubusercontent.com/u/16792514?v=4)](https://github.com/ldjdd "ldjdd (1 commits)")[![colin-at-kiva](https://avatars.githubusercontent.com/u/54085523?v=4)](https://github.com/colin-at-kiva "colin-at-kiva (1 commits)")[![sadok-f](https://avatars.githubusercontent.com/u/533384?v=4)](https://github.com/sadok-f "sadok-f (1 commits)")[![aogier](https://avatars.githubusercontent.com/u/321364?v=4)](https://github.com/aogier "aogier (1 commits)")

---

Tags

tracejaegeropentracing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sablesoft-jaeger-php/health.svg)

```
[![Health](https://phpackages.com/badges/sablesoft-jaeger-php/health.svg)](https://phpackages.com/packages/sablesoft-jaeger-php)
```

###  Alternatives

[jonahgeorge/jaeger-client-php

Jaeger Bindings for PHP OpenTracing API

1484.4M18](/packages/jonahgeorge-jaeger-client-php)[jukylin/jaeger-php

php client for jaeger

2261.6M6](/packages/jukylin-jaeger-php)[auxmoney/opentracing-bundle-core

Symfony Opentracing bundle to easily enable distributed tracing

25904.4k9](/packages/auxmoney-opentracing-bundle-core)[lvht/jaeger

php client for jaeger

1240.5k](/packages/lvht-jaeger)[extraswoft/jaeger

jaeger-sdk for swoft

204.9k](/packages/extraswoft-jaeger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
