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)1479.4k↑12%4[2 issues](https://github.com/jcchavezs/zipkin-instrumentation-guzzle/issues)MITPHPCI failing

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 today

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 83% 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

2031d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[guzzlehttp/guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

25711.0M191](/packages/guzzlehttp-guzzle-services)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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