PHPackages                             tbachert/otel-instrumentation-amphp-http-client - 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. tbachert/otel-instrumentation-amphp-http-client

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

tbachert/otel-instrumentation-amphp-http-client
===============================================

OpenTelemetry amphp/http-client instrumentation

038PHP

Since Mar 30Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Nevay/otel-instrumentation-amphp-http-client)[ Packagist](https://packagist.org/packages/tbachert/otel-instrumentation-amphp-http-client)[ RSS](/packages/tbachert-otel-instrumentation-amphp-http-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

OpenTelemetry [amphp/http-client](https://github.com/amphp/http-client) instrumentation
=======================================================================================

[](#opentelemetry-amphphttp-client-instrumentation)

Installation
------------

[](#installation)

```
composer require tbachert/otel-instrumentation-amphp-http-client
```

Usage
-----

[](#usage)

### Automatic instrumentation

[](#automatic-instrumentation)

This instrumentation is enabled by default.

#### Disable via file-based configuration

[](#disable-via-file-based-configuration)

```
instrumentations/development:
  php:
    amphp_http_client: false
```

#### Disable via env-based configuration

[](#disable-via-env-based-configuration)

```
OTEL_PHP_DISABLED_INSTRUMENTATIONS=amphp-http-client
```

### Manual instrumentation

[](#manual-instrumentation)

```
use Amp\Http\Client\HttpClientBuilder;
use Nevay\OTelInstrumentation\AmphpHttpClient\EventListener\Logs;
use Nevay\OTelInstrumentation\AmphpHttpClient\EventListener\Metrics;
use Nevay\OTelInstrumentation\AmphpHttpClient\EventListener\RequestPropagator;
use Nevay\OTelInstrumentation\AmphpHttpClient\EventListener\Tracing;

$httpClient = (new HttpClientBuilder)
    ->listen(new Tracing($tracerProvider))
    ->listen(new Metrics($meterProvider))
    ->listen(new Logs($loggerProvider))
    ->listen(new RequestPropagator($propagator))
    ->build();

$response = $httpClient->request(...);
```

### Accessing the client span of a request

[](#accessing-the-client-span-of-a-request)

```
use OpenTelemetry\API\Trace\SpanInterface;

$span = $response->getRequest()->getAttribute(SpanInterface::class);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance60

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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/7d96445384720ee37aa71d5ddd7b5a5d159558200b15b8a1b14e65e6095f2a7a?d=identicon)[tbachert](/maintainers/tbachert)

---

Top Contributors

[![Nevay](https://avatars.githubusercontent.com/u/22509671?v=4)](https://github.com/Nevay "Nevay (28 commits)")

### Embed Badge

![Health badge](/badges/tbachert-otel-instrumentation-amphp-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/tbachert-otel-instrumentation-amphp-http-client/health.svg)](https://phpackages.com/packages/tbachert-otel-instrumentation-amphp-http-client)
```

###  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)
