PHPackages                             yuslf/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. yuslf/jaeger-php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

yuslf/jaeger-php
================

php client for jaeger

v1.0.3(8y ago)059MITPHPPHP &gt;=5.6.0

Since Sep 19Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (20)Used By (0)

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-beta2"
  }
}

```

> composer update

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

[](#init-jaeger-php)

```
$config = Config::getInstance();
$tracer = $config->initTrace('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->addTags(['http.status' => "200"]);

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

```

Close Trace
-----------

[](#close-trace)

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

```

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

[](#zipkin-b3-propagation)

> not support `128bit` and `Distributed context propagation `

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

```

finish span and flush Trace
---------------------------

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

```
$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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% 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 ~61 days

Recently: every ~84 days

Total

11

Last Release

2548d ago

Major Versions

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a128add40bf31eb5a26f00acda6991b6fb511be527e360cf2d9245fa65cddfa?d=identicon)[yuslf](/maintainers/yuslf)

---

Top Contributors

[![jky-yy](https://avatars.githubusercontent.com/u/185590763?v=4)](https://github.com/jky-yy "jky-yy (133 commits)")[![yuslf](https://avatars.githubusercontent.com/u/7137478?v=4)](https://github.com/yuslf "yuslf (2 commits)")[![aogier](https://avatars.githubusercontent.com/u/321364?v=4)](https://github.com/aogier "aogier (1 commits)")[![corerman](https://avatars.githubusercontent.com/u/7157314?v=4)](https://github.com/corerman "corerman (1 commits)")[![sadok-f](https://avatars.githubusercontent.com/u/533384?v=4)](https://github.com/sadok-f "sadok-f (1 commits)")

---

Tags

tracejaegeropentracing

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/yuslf-jaeger-php/health.svg)](https://phpackages.com/packages/yuslf-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)[lvht/jaeger

php client for jaeger

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

jaeger-sdk for swoft

204.9k](/packages/extraswoft-jaeger)[vinelab/tracing-laravel

Distributed tracing for Laravel made easy

80118.7k1](/packages/vinelab-tracing-laravel)[auxmoney/opentracing-bundle-core

Symfony Opentracing bundle to easily enable distributed tracing

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

PHPackages © 2026

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