Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zipkin-instrumentation-cujojs-rest

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zipkin-instrumentation-cujojs-rest - npm Package Compare versions

Comparing version 0.18.5 to 0.18.6

6

package.json
{
"name": "zipkin-instrumentation-cujojs-rest",
"version": "0.18.5",
"version": "0.18.6",
"description": "Interceptor for instrumenting HTTP calls from the cujoJS rest library",

@@ -17,3 +17,3 @@ "main": "lib/index.js",

"dependencies": {
"zipkin": "^0.18.5"
"zipkin": "^0.18.6"
},

@@ -23,3 +23,3 @@ "devDependencies": {

},
"gitHead": "201c6f6360d7ae79eaa04d5e53660908e3602358"
"gitHead": "98f7796d54199ccb2a81dea04c466a40814ccb24"
}
# zipkin-instrumentation-cujojs-rest
![npm](https://img.shields.io/npm/dm/zipkin-instrumentation-cujojs-rest.svg)
This library will let you add interceptors to the [rest](https://www.npmjs.com/package/rest) client library.

@@ -4,0 +6,0 @@

@@ -6,6 +6,6 @@ const {expect} = require('chai');

const {
maybeMiddleware,
expectB3Headers,
expectSpan,
newSpanRecorder,
expectB3Headers,
expectSpan
setupTestServer
} = require('../../../test/testFixture');

@@ -19,21 +19,4 @@ const restInterceptor = require('../src/restInterceptor');

let server;
let baseURL = ''; // default to relative path, for browser-based tests
const server = setupTestServer();
before((done) => {
const middleware = maybeMiddleware();
if (middleware !== null) {
server = middleware.listen(0, () => {
baseURL = `http://127.0.0.1:${server.address().port}`;
done();
});
} else { // Inside a browser
done();
}
});
after(() => {
if (server) server.close();
});
let spans;

@@ -60,6 +43,2 @@ let tracer;

function url(path) {
return `${baseURL}${path}?index=10&count=300`;
}
function successSpan(path) {

@@ -80,3 +59,3 @@ return ({

const path = '/weather/wuhan';
return getClient()(url(path))
return getClient()(server.url(path))
.then(response => expectB3Headers(popSpan(), JSON.parse(response.entity)));

@@ -87,3 +66,3 @@ });

const path = '/weather/wuhan';
return getClient()(url(path))
return getClient()(server.url(path))
.then(() => expectSpan(popSpan(), successSpan(path)));

@@ -94,3 +73,3 @@ });

const path = '/pathno';
return getClient()(url(path))
return getClient()(server.url(path))
.then(() => expectSpan(popSpan(), {

@@ -111,3 +90,3 @@ name: 'get',

const path = '/weather/securedTown';
return getClient()(url(path))
return getClient()(server.url(path))
.then(() => expectSpan(popSpan(), {

@@ -128,3 +107,3 @@ name: 'get',

const path = '/weather/bagCity';
return getClient()(url(path))
return getClient()(server.url(path))
.then(() => expectSpan(popSpan(), {

@@ -131,0 +110,0 @@ name: 'get',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc