Skip to content

Latest commit

 

History

History
 
 

zipkin-instrumentation-redis

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

zipkin-instrumentation-redis

npm

This library will wrap the redis client.

Usage

const {Tracer} = require('zipkin');
const Redis = require('redis');
const zipkinClient = require('zipkin-instrumentation-redis');
const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});
const redisConnectionOptions = {
  host: 'localhost',
  port: '6379'
};
const redis = zipkinClient(tracer, Redis, redisConnectionOptions);

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