Skip to content

zarplata/jaeger-client-php

 
 

Repository files navigation

Build Status PHP version

Jaeger Bindings for PHP OpenTracing API

This is a client-side library that can be used to instrument PHP apps for distributed trace collection, and to send those traces to Jaeger. See the OpenTracing PHP API for additional detail.

Contributing and Developing

Please see CONTRIBUTING.md.

Installation

{
  "require": {
    "jonahgeorge/jaeger-client-php": "0.3.0"
  }
}

Getting Started

<?php

require_once 'vendor/autoload.php';

use Jaeger\Config;
use OpenTracing\GlobalTracer;

$config = new Config(
    [
        'sampler' => [
            'type' => 'const', 
            'param' => true,
        ],
        'logging' => true,
    ],
    'your-app-name'
);
$config->initializeTracer();

$tracer = GlobalTracer::get();

$scope = $tracer->startActiveSpan('TestSpan', []);
$scope->close();

$tracer->flush();

Testing

Tests are located in the tests directory. See tests/README.md.

Roadmap

License

MIT License.

About

Jaeger Bindings for PHP OpenTracing API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 97.3%
  • Shell 2.7%