PHPackages                             wdalmut/php-zipkin - 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. wdalmut/php-zipkin

ActiveLibrary

wdalmut/php-zipkin
==================

0112[3 issues](https://github.com/wdalmut/php-zipkin/issues)PHP

Since Jul 4Pushed 8y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHP ZipKin
==========

[](#php-zipkin)

[![Build Status](https://camo.githubusercontent.com/1c9b3a1398239f02b632d6e53074dce139d2692a9d06440987fb461cd48f77d9/68747470733a2f2f7472617669732d63692e6f72672f7764616c6d75742f7068702d7a69706b696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wdalmut/php-zipkin)

A simple ZipKin implementation to trace your microservices based application

```
// create the root span as server receive
$otherSpan = new ServerReceive("get_users", "oauth2", "auth.corley:80");
// add span to the tracer
$tracer->addSpan($otherSpan);

// restore the root span using headers (X-B3-TraceId, X-B3-SpanId, X-B3-ParentSpanId)
$otherSpan->restoreContextFromHeaders($request);

// add a binary annotation on this span
$otherSpan->getBinaryAnnotations()->set("http.method", "GET");

// create a new span (service call)
$span = new ClientSend("getVipUser", "oauth2");
// set span as child of the root span
$span->childOf($otherSpan);
// add span to the tracer
$tracer->addSpan($span);

// add binary annotation on this span
$span->getBinaryAnnotations()->set("error", true);

// sign a custom event on the current span
$span->add("reservedCustomer);

// close the client send span
$span->receive();

// close the server sent span
$otherSpan->sent();
```

Search for a Span
-----------------

[](#search-for-a-span)

When you change your context may you lost a span reference. You can use your binary annotation to search for a particular span

```
$rootSpan = $tracer->findOneBy("kind", "app.flow");

$span = new ClientSend("getUsers", "user.corley");
$span->setChildOf($rootSpan);
```

Send data using the tracer
--------------------------

[](#send-data-using-the-tracer)

```
$logger = new HttpLogger($zipkinHost);
$tracer = new Tracer($logger);

// ...

$tracer->send();
```

Noop tracer
-----------

[](#noop-tracer)

If you want to cut off the tracer your can use our `NoopTracer`

```
$logger = new NoopLogger($zipkinHost);
$tracer = new Tracer($logger);

// ...

$tracer->send();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4765ec4150d94839948ac55e8d87bdaf2af9a7b96fc2cd023dca366d54ff9ca?d=identicon)[wdalmut](/maintainers/wdalmut)

---

Top Contributors

[![wdalmut](https://avatars.githubusercontent.com/u/551974?v=4)](https://github.com/wdalmut "wdalmut (12 commits)")

---

Tags

opentracingphptracingzipkin

### Embed Badge

![Health badge](/badges/wdalmut-php-zipkin/health.svg)

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

PHPackages © 2026

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