OpenTracing instrumentation for Hazelcast.
- Java 8+
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-hazelcast</artifactId>
<version>VERSION</version>
</dependency>
// Instantiate tracer
Tracer tracer = ...
// Register tracer with GlobalTracer:
GlobalTracer.register(tracer);
// Decorate HazelcastInstance with Tracing HazelcastInstance:
HazelcastInstance hazelcast = new TracingHazelcastInstance(Hazelcast.newHazelcastInstance(config),
false);
// Get Map:
ConcurrentMap<String, String> map = hazelcast.getMap("distributed-map");
map.put("key", "value");