zipkin-instrumentation-cujojs-rest
Advanced tools
Comparing version 0.10.1 to 0.11.0
@@ -24,4 +24,3 @@ 'use strict'; | ||
var tracer = _ref.tracer, | ||
_ref$serviceName = _ref.serviceName, | ||
serviceName = _ref$serviceName === undefined ? 'unknown' : _ref$serviceName, | ||
serviceName = _ref.serviceName, | ||
remoteServiceName = _ref.remoteServiceName; | ||
@@ -28,0 +27,0 @@ |
{ | ||
"name": "zipkin-instrumentation-cujojs-rest", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "Interceptor for instrumenting HTTP calls from the cujoJS rest library", | ||
@@ -19,4 +19,4 @@ "main": "lib/index.js", | ||
"rest": "^1.3.2", | ||
"zipkin": "^0.10.1" | ||
"zipkin": "^0.11.0" | ||
} | ||
} |
@@ -12,6 +12,7 @@ # zipkin-instrumentation-cujojs-rest | ||
const tracer = new Tracer({ctxImpl, recorder}); // configure your tracer properly here | ||
const localServiceName = 'service-a'; // name of this application | ||
const tracer = new Tracer({ctxImpl, recorder, localServiceName}); | ||
const nameOfRemoteService = 'youtube'; | ||
const client = rest.wrap(restInterceptor, {tracer, remoteServiceName: nameOfRemoteService}); | ||
const remoteServiceName = 'youtube'; | ||
const client = rest.wrap(restInterceptor, {tracer, remoteServiceName}); | ||
@@ -18,0 +19,0 @@ // Your application code here |
@@ -18,3 +18,3 @@ /* eslint-disable no-param-reassign */ | ||
function request(req, {tracer, serviceName = 'unknown', remoteServiceName}) { | ||
function request(req, {tracer, serviceName, remoteServiceName}) { | ||
this.instrumentation = new Instrumentation.HttpClient({tracer, serviceName, remoteServiceName}); | ||
@@ -21,0 +21,0 @@ return tracer.scoped(() => { |
25
6803
141