OpenTracing Memcached Client Instrumentation
OpenTracing instrumentation for Memcached Client.
Installation
Spymemcached
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spymemcached</artifactId>
<version>VERSION</version>
</dependency>
Usage
// Instantiate tracer
Tracer tracer = ...
// Optionally register tracer with GlobalTracer
GlobalTracer.register(tracer);
Spymemcached
// Create Tracing Memcached Client
MemcachedClient client = new TracingMemcachedClient(tracer, false,
new InetSocketAddress("localhost", 11211))
// Set an object in the cache
client.set("key", 0, "value")