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

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

open-telemetry/opentelemetry-auto-pdo
=====================================

OpenTelemetry auto-instrumentation for PDO

0.4.0(1mo ago)111.2M↑24.5%21Apache-2.0PHPPHP ^8.2

Since Feb 3Pushed 1mo ago3 watchersCompare

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

READMEChangelog (10)Dependencies (26)Versions (25)Used By (1)

[![Releases](https://camo.githubusercontent.com/46e38a504120203bf7615645011bcf2bb834e03e8eb0bc8e0f4864c729fd5baf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c65617365732d707572706c65)](https://github.com/opentelemetry-php/contrib-auto-pdo/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/PDO)[![Mirror](https://camo.githubusercontent.com/2f9050293ab0c0d9471e618215bc7417a63b6873c960e1605bddb69b1911fa4c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6972726f722d6f70656e74656c656d657472792d2d7068702d2d636f6e747269622d626c7565)](https://github.com/opentelemetry-php/contrib-auto-pdo)[![Latest Version](https://camo.githubusercontent.com/2cb0255a3f74b7d52e2a3ba7a16d232c8a247cae4108423d536e8e2546d008f1/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d74656c656d657472792f6f70656e74656c656d657472792d6175746f2d70646f2f762f756e737461626c65)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-pdo/)[![Stable](https://camo.githubusercontent.com/6f77010945575db434e765aaf785eab4b6dd516a6746933b9ed47ce87ff9b35e/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d74656c656d657472792f6f70656e74656c656d657472792d6175746f2d70646f2f762f737461626c65)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-pdo/)

This is a read-only subtree split of .

OpenTelemetry PDO (PHP DataObjects) auto-instrumentation
========================================================

[](#opentelemetry-pdo-php-dataobjects-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 spans will automatically be created for selected `PDO` and `PDOStatement` methods.

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

[](#configuration)

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

```
OTEL_PHP_DISABLED_INSTRUMENTATIONS=pdo
```

In case UI used to view telemetry data does not support links between spans (for example newrelic), you can optionally enable setting db statements attribute to `fetchAll` and `execute` spans using configuration directive:

```
otel.instrumentation.pdo.distribute_statement_to_linked_spans = true

```

or environment variable:

```
OTEL_PHP_INSTRUMENTATION_PDO_DISTRIBUTE_STATEMENT_TO_LINKED_SPANS=true
```

Database Context Propagation
----------------------------

[](#database-context-propagation)

Enable context propagation for database queries (pdo\_mysql, pdo\_pgsql only) by installing the following packages:

```
composer require open-telemetry/opentelemetry-sqlcommenter
```

Currently, only the following functions support context propagation:

- `PDO::query`
- `PDO::exec`

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor4

4 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 ~49 days

Recently: every ~87 days

Total

24

Last Release

55d ago

PHP version history (2 changes)0.0.1PHP ^8.0

0.0.2PHP ^8.2

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

[![brettmc](https://avatars.githubusercontent.com/u/4978962?v=4)](https://github.com/brettmc "brettmc (7 commits)")[![pdelewski](https://avatars.githubusercontent.com/u/102958445?v=4)](https://github.com/pdelewski "pdelewski (6 commits)")[![cedricziel](https://avatars.githubusercontent.com/u/418970?v=4)](https://github.com/cedricziel "cedricziel (4 commits)")[![xvilo](https://avatars.githubusercontent.com/u/390769?v=4)](https://github.com/xvilo "xvilo (4 commits)")[![weslenteche](https://avatars.githubusercontent.com/u/54692047?v=4)](https://github.com/weslenteche "weslenteche (3 commits)")[![jerrytfleung](https://avatars.githubusercontent.com/u/8791493?v=4)](https://github.com/jerrytfleung "jerrytfleung (2 commits)")[![julianocosta89](https://avatars.githubusercontent.com/u/15364991?v=4)](https://github.com/julianocosta89 "julianocosta89 (1 commits)")[![pieterocp](https://avatars.githubusercontent.com/u/68863060?v=4)](https://github.com/pieterocp "pieterocp (1 commits)")[![piotrantosik](https://avatars.githubusercontent.com/u/154553?v=4)](https://github.com/piotrantosik "piotrantosik (1 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")[![siketyan](https://avatars.githubusercontent.com/u/12772118?v=4)](https://github.com/siketyan "siketyan (1 commits)")[![agoallikmaa](https://avatars.githubusercontent.com/u/3532037?v=4)](https://github.com/agoallikmaa "agoallikmaa (1 commits)")[![ycchuang99](https://avatars.githubusercontent.com/u/138915122?v=4)](https://github.com/ycchuang99 "ycchuang99 (1 commits)")[![bobstrecansky](https://avatars.githubusercontent.com/u/4099109?v=4)](https://github.com/bobstrecansky "bobstrecansky (1 commits)")[![ChrisLightfootWild](https://avatars.githubusercontent.com/u/106102472?v=4)](https://github.com/ChrisLightfootWild "ChrisLightfootWild (1 commits)")[![GrzegorzDrozd](https://avatars.githubusercontent.com/u/1885137?v=4)](https://github.com/GrzegorzDrozd "GrzegorzDrozd (1 commits)")[![intuibase](https://avatars.githubusercontent.com/u/9551626?v=4)](https://github.com/intuibase "intuibase (1 commits)")[![John98Zakaria](https://avatars.githubusercontent.com/u/30316353?v=4)](https://github.com/John98Zakaria "John98Zakaria (1 commits)")

---

Tags

pdotracingopentelemetryotelinstrumentationopen-telemetry

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[open-telemetry/opentelemetry-auto-symfony

OpenTelemetry auto-instrumentation for Symfony

551.2M1](/packages/open-telemetry-opentelemetry-auto-symfony)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2222.9M248](/packages/open-telemetry-sdk)[open-telemetry/opentelemetry-auto-wordpress

OpenTelemetry auto-instrumentation for Wordpress

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

PHPackages © 2026

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