Skip to content

Latest commit

 

History

History
 
 

temporal-opentracing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Temporal OpenTracing module

This module provides a set of Interceptors that adds support for OpenTracing Span Context propagation to Temporal.

Usage

You want to register two interceptors - one on the Temporal client side, another on the worker side:

  1. Client configuration:
    WorkflowClientOptions.newBuilder()
       //...
       .setInterceptors(new OpenTracingClientInterceptor())
       .build();
  2. Worker configuration:
    WorkerFactoryOptions.newBuilder()
       //...
       .setWorkerInterceptors(new OpenTracingWorkerInterceptor())
       .build();

OpenTracing has been merged into OpenTelemetry and nowadays OpenTelemetry should be a preferred solution. There is still plenty of OpenTracing usage everywhere and there is an official OpenTracing -> OpenTelemetry bridge, but no OpenTelemetry -> OpenTracing bridges.

To give the best coverage in the simplest way, this module is implemented based on OpenTracing for now. OpenTelemetry users are advised to use the OpenTracing -> OpenTelemetry bridge to hook their OpenTelemetry setup and make it available for OpenTracing API:

    io.opentracing.Tracer tracer = OpenTracingShim.createTracerShim();
    //or io.opentracing.Tracer tracer = OpenTracingShim.createTracerShim(openTelemetry);
    GlobalTracer.registerIfAbsent(tracer);