Skip to content

Commit 1be097d

Browse files
committed
Add README.md
1 parent 9508e88 commit 1be097d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

temporal-opentracing/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+

0 commit comments

Comments
 (0)