0.22.0 • Published 4 years ago

zipkin-instrumentation-connect v0.22.0

Weekly downloads
21
License
Apache-2.0
Repository
github
Last release
4 years ago

zipkin-instrumentation-connect

A Connect middleware and instrumentation that adds Zipkin tracing to the application. Compatible with any server which uses the connect api (Express and Restify).

Usage

Connect

const connect = require('connect');
const {Tracer, ExplicitContext, ConsoleRecorder} = require('zipkin');
const zipkinMiddleware = require('zipkin-instrumentation-connect');

const ctxImpl = new ExplicitContext();
const recorder = new ConsoleRecorder();
const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});

const app = connect();

// Add the Zipkin middleware
app.use(zipkinMiddleware({tracer}));

Express

const express = require('express');
const {Tracer, ExplicitContext, ConsoleRecorder} = require('zipkin');
const zipkinMiddleware = require('zipkin-instrumentation-connect');

const ctxImpl = new ExplicitContext();
const recorder = new ConsoleRecorder();
const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});

const app = express();

// Add the Zipkin middleware
app.use(zipkinMiddleware({tracer}));

Restify

const restify = require('restify');
const {Tracer, ExplicitContext, ConsoleRecorder} = require('zipkin');
const zipkinMiddleware = require('zipkin-instrumentation-connect');

const ctxImpl = new ExplicitContext();
const recorder = new ConsoleRecorder();
const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});

const app = restify.createServer();

// Add the Zipkin middleware
app.use(zipkinMiddleware({tracer}));
0.22.1-alpha.6

4 years ago

0.22.1-alpha.3

5 years ago

0.22.0

5 years ago

0.21.0

5 years ago

0.20.0

5 years ago

0.19.2

5 years ago

0.19.2-alpha.6

5 years ago

0.19.2-alpha.3

5 years ago

0.19.2-alpha.1

6 years ago

0.19.1

6 years ago

0.20.0-alpha.1

6 years ago

0.20.0-alpha.0

6 years ago

0.19.0

6 years ago

0.18.6

6 years ago

0.18.5

6 years ago

0.18.4

6 years ago

0.18.4-alpha.7

6 years ago

0.19.0-alpha.4

6 years ago

0.18.3

6 years ago

0.18.2

6 years ago

0.18.1

6 years ago

0.18.0

6 years ago

0.17.1

6 years ago

0.17.0

6 years ago

0.16.2

6 years ago

0.16.1

6 years ago

0.16.0

6 years ago

0.15.0

7 years ago