opentracing / opentracing-php

OpenTracing API for PHP
Apache License 2.0
505 stars 56 forks source link

No Document guild how to provide connection to Jaeger #115

Closed CHOMNANP closed 2 years ago

CHOMNANP commented 3 years ago

Background

I am looking run this in Laravel with Jaeger.

Problem

There is no document showing how to specify the connection to jaeger.

Proposal

Questions to address

How to connect this client library to Jaeger.

tobiasmuehl commented 2 years ago

use OpenTracing\GlobalTracer;
use Jaeger\Config;

$config = new Config(
    [
        'sampler' => [
            'type' => Jaeger\SAMPLER_TYPE_PROBABILISTIC,
            'param' => 1.00,
        ],
        'logging' => true,
        'dispatch_mode' => 'jaeger_over_binary_udp',
        'local_agent' => [
            'reporting_host' => // IP address of jaeger
            'reporting_port' => 6832
        ]
    ],
    'service_name'
);
$tracer = $config->initializeTracer();
jcchavezs commented 2 years ago

We don't provide such a thing for any concrete implementation. Such things belong in the jaeger repository.