PHPackages                             lightstep/opencensus-exporter-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. lightstep/opencensus-exporter-zipkin

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

lightstep/opencensus-exporter-zipkin
====================================

OpenCensus Zipkin Exporter for PHP, forked for LightStep

v0.3.0(6y ago)030.7k↑16.7%1Apache-2.0PHPPHP &gt;=5.6

Since Apr 19Pushed 6y agoCompare

[ Source](https://github.com/lightstep/opencensus-php-exporter-zipkin)[ Packagist](https://packagist.org/packages/lightstep/opencensus-exporter-zipkin)[ RSS](/packages/lightstep-opencensus-exporter-zipkin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (0)

OpenCensus Zipkin Exporter for PHP
==================================

[](#opencensus-zipkin-exporter-for-php)

This library provides an [`ExporterInterface`](https://github.com/census-instrumentation/opencensus-php/blob/master/src/Trace/Exporter/ExporterInterface.php) for exporting Trace data to a Zipkin instance.

This is a fork of the [OpenCensus PHP exporter](https://github.com/lightstep/opencensus-php-exporter-zipkin) modified to report to LightStep.

[![CircleCI](https://camo.githubusercontent.com/fb784d829964e0d56b8457fd56d73cc25461fd9d6bd5555378a86eacbd29f193/68747470733a2f2f636972636c6563692e636f6d2f67682f63656e7375732d65636f73797374656d2f6f70656e63656e7375732d7068702d6578706f727465722d7a69706b696e2e7376673f7374796c653d737667)](https://circleci.com/gh/census-ecosystem/opencensus-php-exporter-zipkin)[![Packagist](https://camo.githubusercontent.com/45a8919e4be0bc6cd1a504720ea559fbf959d22497b9a20a5f5ff1e3bb55ef97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e63656e7375732f6f70656e63656e7375732d6578706f727465722d7a69706b696e2e737667)](https://packagist.org/packages/lightstep/opencensus-exporter-zipkin)[![PHP-Version](https://camo.githubusercontent.com/0019e650c7e6c1cba629b53a5a3b5b36719ec95f2501ea29ba03c32ddec7d944/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f70656e63656e7375732f6f70656e63656e7375732d6578706f727465722d7a69706b696e2e737667)](https://camo.githubusercontent.com/0019e650c7e6c1cba629b53a5a3b5b36719ec95f2501ea29ba03c32ddec7d944/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f70656e63656e7375732f6f70656e63656e7375732d6578706f727465722d7a69706b696e2e737667)

Installation &amp; basic usage
------------------------------

[](#installation--basic-usage)

1. Install the `lightstep/opencensus-exporter-zipkin` package using [composer](https://getcomposer.org/):

    ```
    $ composer require lightstep/opencensus-exporter-zipkin:~0.2
    ```
2. Initialize a tracer for your application:

    ```
    use OpenCensus\Trace\Tracer;
    use OpenCensus\Trace\Exporter\ZipkinExporter;

    Tracer::start(new ZipkinExporter('my-service-name'));
    ```

Customization
-------------

[](#customization)

### Configuring the Zipkin endpoint

[](#configuring-the-zipkin-endpoint)

You may provide an optional initialization parameter for the Zipkin endpoint. This value should be a full URL to the v2 spans endpoint.

```
$exporter = new ZipkinExporter('my-service-name', LIGHTSTEP_ACCESS_TOKEN, 'http://example.com:9411/api/v2/spans');
```

### Configuring the local IPv4 or IPv6 address

[](#configuring-the-local-ipv4-or-ipv6-address)

Zipkin allows you to optionally specify the host IP address of the server that is handling the traced requests.

For IPv4:

```
// gethostbyname may make a DNS query, so you may want to cache this
$ipv4 = gethostbyname(gethostname());
$exporter->setLocalIpv4($ipv4);
```

Similarly, you may set the local IPv6 address if you can obtain it:

```
$exporter->setLocalIpv6($ipv6);
```

Versioning
----------

[](#versioning)

[![Packagist](https://camo.githubusercontent.com/54f655ee58b1c56444022fbbd4e70e30badbad5ab7eb84d33423d5f6753efa81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c69676874737465702f6f70656e63656e7375732d6578706f727465722d7a69706b696e2e737667)](https://packagist.org/packages/lightstep/opencensus-exporter-zipkin)

This library follows [Semantic Versioning](http://semver.org/).

Please note it is currently under active development. Any release versioned 0.x.y is subject to backwards incompatible changes at any time.

**GA**: Libraries defined at a GA quality level are stable, and will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

**Beta**: Libraries defined at a Beta quality level are expected to be mostly stable and we're working towards their release candidate. We will address issues and requests with a higher priority.

**Alpha**: Libraries defined at an Alpha quality level are still a work-in-progress and are more likely to get backwards-incompatible updates.

**Current Status:** Alpha

Contributing
------------

[](#contributing)

Contributions to this library are always welcome and highly encouraged.

See [CONTRIBUTING](CONTRIBUTING.md) for more information on how to get started.

Releasing
---------

[](#releasing)

See [RELEASING](RELEASING.md) for more information on releasing new versions.

License
-------

[](#license)

Apache 2.0 - See [LICENSE](LICENSE) for more information.

Disclaimer
----------

[](#disclaimer)

This is not an official Google product.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~292 days

Total

3

Last Release

2366d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ef3dccc74ffe7961b9246973c06340aaf064ea1d12bca32c87305ea6dc8d9a8?d=identicon)[lightstep](/maintainers/lightstep)

---

Top Contributors

[![chingor13](https://avatars.githubusercontent.com/u/32483?v=4)](https://github.com/chingor13 "chingor13 (8 commits)")[![bg451](https://avatars.githubusercontent.com/u/1350653?v=4)](https://github.com/bg451 "bg451 (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lightstep-opencensus-exporter-zipkin/health.svg)

```
[![Health](https://phpackages.com/badges/lightstep-opencensus-exporter-zipkin/health.svg)](https://phpackages.com/packages/lightstep-opencensus-exporter-zipkin)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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