File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Temporal [ OpenTracing] ( https://opentracing.io/ ) support module
2
+
3
+ This module provides a set of Interceptors that adds support for OpenTracing Span Context propagation to Temporal.
4
+
5
+ ## Usage
6
+
7
+ You want to register two interceptors - one on the Temporal client side, another on the worker side:
8
+
9
+ 1 . Client configuration:
10
+ ``` java
11
+ WorkflowClientOptions . newBuilder()
12
+ // ...
13
+ .setInterceptors(new OpenTracingClientInterceptor ())
14
+ .build();
15
+ ```
16
+ 2. Worker configuration:
17
+ ```java
18
+ WorkerFactoryOptions . newBuilder()
19
+ // ...
20
+ .setWorkerInterceptors(new OpenTracingWorkerInterceptor ())
21
+ .build();
22
+ ```
23
+
24
+ ## [OpenTelemetry ](https: // opentelemetry.io/)
25
+
26
+ OpenTracing has been merged into OpenTelemetry and nowadays OpenTelemetry should be a preferred solution.
27
+ There is still plenty of OpenTracing usage everywhere and there is an official OpenTracing - > OpenTelemetry bridge,
28
+ but no OpenTelemetry - > OpenTracing bridges.
29
+
30
+ To give the best coverage in the simplest way, this module is implemented based on OpenTracing for now.
31
+ OpenTelemetry users are advised to use the
32
+ [OpenTracing - > OpenTelemetry bridge](https: // github.com/open-telemetry/opentelemetry-java/tree/main/opentracing-shim)
33
+ to hook their OpenTelemetry setup and make it available for OpenTracing API :
34
+
35
+ ```java
36
+ Tracer tracer = OpenTracingShim . createTracerShim();
37
+ // Tracer tracer = OpenTracingShim.createTracerShim(openTelemetry);
38
+ GlobalTracer . registerIfAbsent(tracer);
39
+ ```
40
+
41
+
You can’t perform that action at this time.
0 commit comments