Skip to content

Latest commit

 

History

History
 
 

zipkin-instrumentation-memcached

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

zipkin-instrumentation-memcached

npm

This library will wrap the memcached client.

Usage

const {Tracer} = require('zipkin');
const Memcached = require('memcached');
const zipkinClient = require('zipkin-instrumentation-memcached');

const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});

const connectionString = ''localhost:11211'';
const options = {timeout: 1000};
const memcached = new (zipkinClient(tracer, Memcached))(connectionString, options);

// Your application code here
memcached.get('foo', (err, data) => {
  console.log('got', data.foo);
});