zipkin-instrumentation-cujojs-rest

0.22.0 • Public • Published

zipkin-instrumentation-cujojs-rest

npm

This library will let you add interceptors to the rest client library.

Usage

const {Tracer} = require('zipkin');
const rest = require('rest');
const {restInterceptor} = require('zipkin-instrumentation-cujojs-rest');
 
const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});
 
const remoteServiceName = 'youtube';
const client = rest.wrap(restInterceptor, {tracer, remoteServiceName});
 
// Your application code here
client('http://www.youtube.com/').then(success => {
  console.log('got result from YouTube');
}, error => {
  console.error('Error', error);
});

Readme

Keywords

none

Package Sidebar

Install

npm i zipkin-instrumentation-cujojs-rest

Weekly Downloads

4

Version

0.22.0

License

Apache-2.0

Unpacked Size

15.2 kB

Total Files

10

Last publish

Collaborators

  • openzipkin