PHPackages                             jcchavezs/dd-opentracing - 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. jcchavezs/dd-opentracing

Abandoned → [https://github.com/dataDog/dd-trace-php](/?search=https%3A%2F%2Fgithub.com%2FdataDog%2Fdd-trace-php)Library[Logging &amp; Monitoring](/categories/logging)

jcchavezs/dd-opentracing
========================

DataDog implementation for OpenTracing in PHP

0.3.1(9y ago)31111[1 issues](https://github.com/jcchavezs/dd-opentracing-php/issues)1GPL-3.0PHPPHP ^5.6||^7.0

Since Apr 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jcchavezs/dd-opentracing-php)[ Packagist](https://packagist.org/packages/jcchavezs/dd-opentracing)[ RSS](/packages/jcchavezs-dd-opentracing/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (5)Versions (6)Used By (1)

DataDog OpenTracing PHP
=======================

[](#datadog-opentracing-php)

[![Build Status](https://camo.githubusercontent.com/872692f2abf493dbafa12d3ea48018e84e9a1010e4ecb11c9929827378e2c320/68747470733a2f2f7472617669732d63692e6f72672f6a6363686176657a732f64642d6f70656e74726163696e672d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jcchavezs/dd-opentracing-php)[![Join the chat at https://gitter.im/dd-opentracing-php/Lobby](https://camo.githubusercontent.com/7993f1142fb25e618504c3059e6b17abb6aafcf41c1c68a1cdbf1432df21bec4/68747470733a2f2f6261646765732e6769747465722e696d2f64642d6f70656e74726163696e672d7068702f4c6f6262792e737667)](https://gitter.im/dd-opentracing-php/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

DataDog implementation for OpenTracing in PHP

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

[](#installation)

Execute:

```
composer require jcchavezs/dd-opentracing
```

Examples
--------

[](#examples)

```
use DdOpenTracing\Tracer;
use OpenTracing\Carriers\HttpHeaders;
use OpenTracing\GlobalTracer;
use OpenTracing\Propagator;
use OpenTracing\SpanContext;
use OpenTracing\SpanReference\ChildOf;
use OpenTracing\Tag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$request = Request::createFromGlobals();

$client = new \GuzzleHttp\Client();
$logger = new \Monolog\Logger("log");
$encoderFactory = new \DdTrace\Encoders\JsonFactory;
$transport = new \DdTrace\Transports\Http($client, $logger, $encoderFactory);
$buffer = new \DdTrace\Buffer();
$ddTracer = new \DdTrace\Tracer($buffer, $logger, $transport);

$tracer = new Tracer($ddTracer, $logger);
$tracer->enableDebugLogging();

GlobalTracer::setGlobalTracer($tracer);

$spanContext = GlobalTracer::globalTracer()->extract(
    Propagator::HTTP_HEADERS,
    HttpHeaders::fromRequest($request)
);

usleep(200);

readFromDB($spanContext);

$response = Response::create("", 200);

$response->send();

// This flushes the traces, if the buffer could be persisted, a worker could flush the traces from time to time.
$tracer->tracer()->flushTraces();

function readFromDB(SpanContext $spanContext)
{
    $tracer = GlobalTracer::globalTracer();

    $component = Tag::create("component", "SELECT * FROM test_table");
    $peerService = Tag::create("peer.service", "test_service");

    $span = $tracer->startSpan("Db read", ChildOf::withContext($spanContext), null, $component, $peerService);

    usleep(3000);

    $span->finish();
}
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~6 days

Total

5

Last Release

3328d ago

### 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 (14 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

dd-traceopentracingphptracing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jcchavezs-dd-opentracing/health.svg)

```
[![Health](https://phpackages.com/badges/jcchavezs-dd-opentracing/health.svg)](https://phpackages.com/packages/jcchavezs-dd-opentracing)
```

###  Alternatives

[aws/aws-sdk-php

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

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)

PHPackages © 2026

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