PHPackages                             yoopies/dd-trace-polyfill-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. yoopies/dd-trace-polyfill-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yoopies/dd-trace-polyfill-php
=============================

Polyfill for the Datadog dd-trace PHP extension

1.2.0(1y ago)05MITPHPPHP &gt;=7.4

Since Oct 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Yoopies/dd-trace-polyfill-php)[ Packagist](https://packagist.org/packages/yoopies/dd-trace-polyfill-php)[ RSS](/packages/yoopies-dd-trace-polyfill-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

Polyfill for the dd-trace PHP extension.

[![Total Downloads](https://camo.githubusercontent.com/45f836898134812ed2bf7bd716ad8a14ceeea099e4f0a493085017072c04ef53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796f6f706965732f64642d74726163652d706f6c7966696c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yoopies/dd-trace-polyfill)

Using [Datadog Trace's PHP extension](https://docs.datadoghq.com/fr/security_platform/application_security/setup_and_configure/#add-user-information-to-traces) requires us to use this pattern everywhere:

```
if (extension_loaded('ddtrace')) {
    $rootSpan = \DDTrace\root_span();
    $rootSpan->meta['usr.id'] = '123456789';
}
```

This package is a polyfill re-declaring all the functions provided by Datadog when the extension is not installed. In other words, after installing this polyfill you can rely on the function to exist:

```
$span = \DDTrace\active_span();
```

If the extension is installed, everything will work as expected. If not (for example on your development machine) nothing will happen.

### Installation

[](#installation)

```
composer require yoopies/dd-trace-polyfill-php

```

That's all you need to do!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~153 days

Total

5

Last Release

685d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c47405e3fe1230f2e16bf42807ab6ad496c884db4f07d5fb9a5afb0a525d2fb0?d=identicon)[YoopiesDev](/maintainers/YoopiesDev)

---

Top Contributors

[![AntoineLemaire](https://avatars.githubusercontent.com/u/2025537?v=4)](https://github.com/AntoineLemaire "AntoineLemaire (6 commits)")

---

Tags

polyfillDataDog

### Embed Badge

![Health badge](/badges/yoopies-dd-trace-polyfill-php/health.svg)

```
[![Health](https://phpackages.com/badges/yoopies-dd-trace-polyfill-php/health.svg)](https://phpackages.com/packages/yoopies-dd-trace-polyfill-php)
```

###  Alternatives

[symfony/polyfill-mbstring

Symfony polyfill for the Mbstring extension

7.8k1.2B516](/packages/symfony-polyfill-mbstring)[paragonie/random_compat

PHP 5.x polyfill for random\_bytes() and random\_int() from PHP 7

8.2k655.0M405](/packages/paragonie-random-compat)[symfony/polyfill-ctype

Symfony polyfill for ctype functions

4.0k982.0M125](/packages/symfony-polyfill-ctype)[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.8k674.7M31](/packages/symfony-polyfill-php72)[symfony/polyfill-intl-idn

Symfony polyfill for intl's idn\_to\_ascii and idn\_to\_utf8 functions

3.4k774.6M90](/packages/symfony-polyfill-intl-idn)[symfony/polyfill-intl-normalizer

Symfony polyfill for intl's Normalizer class and related functions

2.1k830.2M36](/packages/symfony-polyfill-intl-normalizer)

PHPackages © 2026

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