use Grpc\Internal\InterceptorChannel;
use OpenTracingInterceptor\Interceptor;
use Acme\Tracer;
use Foo\Bar\SomeGrpcClient;
use Foo\Bar\SomeGrpcMethodArgs;
$host = 'grpc.server.com:1313';
$tracer = new Tracer();
$channel = SomeGrpcClient::getDefaultChannel($host);
$openTracingInterceptor = new Interceptor($tracer);
$interceptor = new InterceptorChannel($channel, $openTracingInterceptor);
$rootSpan = $tracer->startSpan("rootSpan");
$client = new SomeGrpcClient($host, [], $interceptor);
$args = new SomeGrpcMethodArgs();
$options = [
'child_of' => $rootSpan
];
$result = $client->SomeGrpcMethodCall($args, [], $options);
$rootSpan->finish();
$tracer->flush();
-
Notifications
You must be signed in to change notification settings - Fork 0
License
khunafin/opentracing-grpc-interceptor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published