PHPackages                             jcchavezs/zipkin-instrumentation-guzzle - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. jcchavezs/zipkin-instrumentation-guzzle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jcchavezs/zipkin-instrumentation-guzzle
=======================================

Zipkin instrumentation for Guzzle HTTP Client

2.0.0(5y ago)1478.4k↓36.7%4[2 issues](https://github.com/jcchavezs/zipkin-instrumentation-guzzle/issues)MITPHP

Since Mar 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jcchavezs/zipkin-instrumentation-guzzle)[ Packagist](https://packagist.org/packages/jcchavezs/zipkin-instrumentation-guzzle)[ RSS](/packages/jcchavezs-zipkin-instrumentation-guzzle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

Zipkin instrumentation for Guzzle
=================================

[](#zipkin-instrumentation-for-guzzle)

[![CI](https://github.com/jcchavezs/zipkin-instrumentation-guzzle/workflows/CI/badge.svg)](https://github.com/jcchavezs/zipkin-instrumentation-guzzle/workflows/CI/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/69ae23679771cfa8bdf1190a85a22e4d2dbd3176c15e45ae14420ec79adce4bb/68747470733a2f2f706f7365722e707567782e6f72672f6a6363686176657a732f7a69706b696e2d696e737472756d656e746174696f6e2d67757a7a6c652f762f737461626c65)](https://packagist.org/packages/jcchavezs/zipkin-instrumentation-guzzle)[![Total Downloads](https://camo.githubusercontent.com/2a12817624ba20059a3656dbc2c6d23e001d960a43c0b2089dc730374d65e8b9/68747470733a2f2f706f7365722e707567782e6f72672f6a6363686176657a732f7a69706b696e2d696e737472756d656e746174696f6e2d67757a7a6c652f646f776e6c6f616473)](https://packagist.org/packages/jcchavezs/zipkin-instrumentation-guzzle)[![License](https://camo.githubusercontent.com/67de7809815203bffaf2362ae4b57ad0a47efa18fc8ac9b60d86a020df768d60/68747470733a2f2f706f7365722e707567782e6f72672f6a6363686176657a732f7a69706b696e2d696e737472756d656e746174696f6e2d67757a7a6c652f6c6963656e7365)](https://packagist.org/packages/jcchavezs/zipkin-instrumentation-guzzle)

Zipkin instrumentation for Guzzle HTTP Client.

Install
-------

[](#install)

```
composer require jcchavezs/zipkin-instrumentation-guzzle
```

Usage
-----

[](#usage)

`ZipkinGuzzle\Middleware` is an [Guzzle middleware](http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html) that can be used along with `GuzzleHttp\Client` to create a span and propagate the context.

### Default handler

[](#default-handler)

You can use the default handler to easy the instrumentation:

```
use Zipkin\TracingBuilder;
use ZipkinGuzzle\Middleware;

$tracing = TracingBuilder::create()->build();

// Default tags for all spans being created. They are not mandatory.
$tags = [
   'instance' => $_SERVER['SERVER_NAME']
];

$client = new Client([
    'handler' => Middleware\handlerStack($tracing, $tags),
]);
```

### Customizing handler

[](#customizing-handler)

If you need to customize the tracing handler (e.g. wrapping it with another handler) you can create a `GuzzleHttp\HandlerStack` and push/unshift handlers into it making sure the **tracing middleware stays at the top of the stack**:

```
use GuzzleHttp\HandlerStack;
use Zipkin\TracingBuilder;
use ZipkinGuzzle\Middleware;

$tracing = TracingBuilder::create()->build();

$stack = HandlerStack::create();
$stack->push(someMiddleware());
...
$stack->push(Middleware\tracing($tracing));

$client = new Client([
    'handler' => $stack,
]);
```

Guzzle 7
--------

[](#guzzle-7)

Guzzle 7 is [compatible with PSR18 clients](https://github.com/guzzle/guzzle/blob/7.2.0/CHANGELOG.md#700-beta1---2019-12-30), hence you can use the native Zipkin instrumentation. Check  for more details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~123 days

Recently: every ~217 days

Total

9

Last Release

1986d ago

Major Versions

0.1.2 → 1.0.02018-04-23

1.1.0 → 2.0.02020-12-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b5352392ac3b571d5e5d144f6e992040e46726c0863552882cdd8d2577c2eb7?d=identicon)[jcchavezs](/maintainers/jcchavezs)

---

Top Contributors

[![jcchavezs](https://avatars.githubusercontent.com/u/3075074?v=4)](https://github.com/jcchavezs "jcchavezs (33 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")[![Dipenduroy](https://avatars.githubusercontent.com/u/5229482?v=4)](https://github.com/Dipenduroy "Dipenduroy (1 commits)")

---

Tags

guzzlehttpclientinstrumentationzipkinzipkin-instrumentation

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jcchavezs-zipkin-instrumentation-guzzle/health.svg)

```
[![Health](https://phpackages.com/badges/jcchavezs-zipkin-instrumentation-guzzle/health.svg)](https://phpackages.com/packages/jcchavezs-zipkin-instrumentation-guzzle)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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