Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Remitly/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

Jaeger client can be installed via Composer:

composer require jonahgeorge/jaeger-client-php

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.5%
  • Shell 2.5%