PHPackages                             open-telemetry/opentelemetry-auto-curl - 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. open-telemetry/opentelemetry-auto-curl

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

open-telemetry/opentelemetry-auto-curl
======================================

OpenTelemetry auto-instrumentation for curl

0.2.0(3mo ago)1454.3k↑47.8%Apache-2.0PHPPHP ^8.2

Since Nov 6Pushed 3w ago4 watchersCompare

[ Source](https://github.com/opentelemetry-php/contrib-auto-curl)[ Packagist](https://packagist.org/packages/open-telemetry/opentelemetry-auto-curl)[ Docs](https://opentelemetry.io/docs/languages/php/)[ RSS](/packages/open-telemetry-opentelemetry-auto-curl/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (7)Dependencies (22)Versions (8)Used By (0)

[![Releases](https://camo.githubusercontent.com/46e38a504120203bf7615645011bcf2bb834e03e8eb0bc8e0f4864c729fd5baf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c65617365732d707572706c65)](https://github.com/opentelemetry-php/contrib-auto-curl/releases)[![Issues](https://camo.githubusercontent.com/b9b31135f113cdb6e2b662b4040276044ee0803567bc17688eaf4386f797ea50/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6973737565732d70696e6b)](https://github.com/open-telemetry/opentelemetry-php/issues)[![Source](https://camo.githubusercontent.com/e27dd1126a60abf1c26521d893d9f235ef342a76231c2428ddbc4651185bd626/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d636f6e747269622d677265656e)](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/src/Instrumentation/curl)[![Mirror](https://camo.githubusercontent.com/2f9050293ab0c0d9471e618215bc7417a63b6873c960e1605bddb69b1911fa4c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6972726f722d6f70656e74656c656d657472792d2d7068702d2d636f6e747269622d626c7565)](https://github.com/opentelemetry-php/contrib-auto-curl)[![Latest Version](https://camo.githubusercontent.com/05b6c6990ff5fdb85db68553d602c4a1c03effcf881dd896f105b15f9613123a/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d74656c656d657472792f6f70656e74656c656d657472792d6175746f2d6375726c2f762f756e737461626c65)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-curl/)[![Stable](https://camo.githubusercontent.com/1d51b8418ca73b9a11e1e5fea6e2d4ba5f5ddbff8c7c9860c7161ebda3b4f963/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d74656c656d657472792f6f70656e74656c656d657472792d6175746f2d6375726c2f762f737461626c65)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-curl/)

This is a read-only subtree split of .

OpenTelemetry curl auto-instrumentation
=======================================

[](#opentelemetry-curl-auto-instrumentation)

Please read  for instructions on how to install and configure the extension and SDK.

Overview
--------

[](#overview)

Auto-instrumentation hooks are registered via composer, and client kind spans will automatically be created when calling `curl_exec` or `curl_multi_exec` functions. Additionally, distributed tracing is supported by setting the `traceparent` header.

Limitations
-----------

[](#limitations)

The curl\_multi instrumentation is not resilient to shortcomings in the application and requires proper implementation. If the application does not call the curl\_multi\_info\_read function, the instrumentation will be unable to measure the execution time for individual requests-time will be aggregated for all transfers. Similarly, error detection will be impacted, as the error code information will be missing in this case. In case of encountered issues, it is recommended to review the application code and adjust it to match example #1 provided in [curl\_multi\_exec documentation](https://www.php.net/manual/en/function.curl-multi-exec.php).

To ensure the stability of the monitored application, capturing request headers sent to the server works only if the application does not use the `CURLOPT_VERBOSE` option.

Configuration
-------------

[](#configuration)

### Disabling curl instrumentation

[](#disabling-curl-instrumentation)

The extension can be disabled via [runtime configuration](https://opentelemetry.io/docs/instrumentation/php/sdk/#configuration):

```
OTEL_PHP_DISABLED_INSTRUMENTATIONS=curl
```

### Request and response headers capturing

[](#request-and-response-headers-capturing)

Curl auto-instrumentation enables capturing headers from both requests and responses. This feature is disabled by default and be enabled through environment variables or array directives in the `php.ini` configuration file.

To enable response header capture from the server, specify the required headers as shown in the example below. In this case, the "Content-Type" and "Server" headers will be captured. These options values are case-insensitive:

#### Environment variables configuration

[](#environment-variables-configuration)

```
OTEL_PHP_INSTRUMENTATION_HTTP_RESPONSE_HEADERS=content-type,server
OTEL_PHP_INSTRUMENTATION_HTTP_REQUEST_HEADERS=host,accept
```

#### php.ini configuration

[](#phpini-configuration)

```
OTEL_PHP_INSTRUMENTATION_HTTP_RESPONSE_HEADERS=content-type,server
; or
otel.instrumentation.http.response_headers[]=content-type
otel.instrumentation.http.response_headers[]=server
```

Similarly, to capture headers sent in a request to the server, use the following configuration:

```
OTEL_PHP_INSTRUMENTATION_HTTP_REQUEST_HEADERS=host,accept
; or
otel.instrumentation.http.request_headers[]=host
otel.instrumentation.http.request_headers[]=accept
```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~83 days

Recently: every ~98 days

Total

7

Last Release

101d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4978962?v=4)[Brett McBride](/maintainers/brettmc)[@brettmc](https://github.com/brettmc)

![](https://avatars.githubusercontent.com/u/4099109?v=4)[Bob Strecansky](/maintainers/bobstrecansky)[@bobstrecansky](https://github.com/bobstrecansky)

---

Top Contributors

[![intuibase](https://avatars.githubusercontent.com/u/9551626?v=4)](https://github.com/intuibase "intuibase (4 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (3 commits)")[![brettmc](https://avatars.githubusercontent.com/u/4978962?v=4)](https://github.com/brettmc "brettmc (2 commits)")[![smaddock](https://avatars.githubusercontent.com/u/524425?v=4)](https://github.com/smaddock "smaddock (1 commits)")[![vikmovcan](https://avatars.githubusercontent.com/u/7762799?v=4)](https://github.com/vikmovcan "vikmovcan (1 commits)")[![bobstrecansky](https://avatars.githubusercontent.com/u/4099109?v=4)](https://github.com/bobstrecansky "bobstrecansky (1 commits)")[![vsimon](https://avatars.githubusercontent.com/u/137727?v=4)](https://github.com/vsimon "vsimon (1 commits)")[![ChrisLightfootWild](https://avatars.githubusercontent.com/u/106102472?v=4)](https://github.com/ChrisLightfootWild "ChrisLightfootWild (1 commits)")[![pieterocp](https://avatars.githubusercontent.com/u/68863060?v=4)](https://github.com/pieterocp "pieterocp (1 commits)")

---

Tags

curltracingopentelemetryotelinstrumentationopen-telemetry

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/open-telemetry-opentelemetry-auto-curl/health.svg)

```
[![Health](https://phpackages.com/badges/open-telemetry-opentelemetry-auto-curl/health.svg)](https://phpackages.com/packages/open-telemetry-opentelemetry-auto-curl)
```

###  Alternatives

[open-telemetry/opentelemetry-auto-laravel

OpenTelemetry auto-instrumentation for Laravel

592.7M9](/packages/open-telemetry-opentelemetry-auto-laravel)[open-telemetry/opentelemetry-auto-symfony

OpenTelemetry auto-instrumentation for Symfony

561.6M3](/packages/open-telemetry-opentelemetry-auto-symfony)[traceway/opentelemetry-symfony

Pure-PHP OpenTelemetry instrumentation for Symfony — automatic HTTP, Console, HttpClient, Messenger, Doctrine DBAL, Cache, Twig tracing and Monolog log-trace correlation with response propagation, a lightweight Tracing helper, route templates, and semantic conventions. No C extension required (ext-protobuf recommended for production).

7812.6k](/packages/traceway-opentelemetry-symfony)[open-telemetry/opentelemetry-auto-pdo

OpenTelemetry auto-instrumentation for PDO

111.7M2](/packages/open-telemetry-opentelemetry-auto-pdo)[open-telemetry/opentelemetry-auto-wordpress

OpenTelemetry auto-instrumentation for Wordpress

17209.2k](/packages/open-telemetry-opentelemetry-auto-wordpress)

PHPackages © 2026

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