OpenTracing Hazelcast Instrumentation
OpenTracing instrumentation for Hazelcast.
Requirements
- Java 8+
Installation
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-hazelcast</artifactId>
<version>VERSION</version>
</dependency>
Usage
// 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");