Skip to content

Files

Latest commit

Apr 16, 2020
324702a · Apr 16, 2020

History

History
This branch is 13 commits behind openzipkin/zipkin-js:master.

zipkin-instrumentation-memcached

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);
});