OpenTracing instrumentation for curator framework
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-curator</artifactId>
<version>0.0.1</version>
</dependency>build.gradle
compile 'io.opentracing.contrib:opentracing-curator:0.0.1'Add the tracing module in your list
CuratorFramework client = ...;
TracerDriver tracerDrivier = new OpentracingCuratorDriver();
client.getZookeeperClient().setTracerDriver(tracerDrivier);Alternatively, you can define the peer service name
CuratorFramework client = ...;
TracerDriver tracerDrivier = new OpentracingCuratorDriver("peerServiceName");
client.getZookeeperClient().setTracerDriver(tracerDrivier);You can find more info on curator here
The following tags are added to traces :
| Span tag name | Notes |
|---|---|
span.kind |
client |
component |
java-curator |
peer.service |
if exists, the peer service name set in OpentracingCuratorDriver ctor |
error |
true if any error occurred. false otherwise |
session.id |
the zookeeper session id of the current operation |
path |
if exists, the zookeeper node on which the operation took place |