0.2.1 • Published 9 years ago

tracing-middleware v0.2.1

Weekly downloads
13
License
Apache-2.0
Repository
github
Last release
9 years ago

tracing-middleware

Middleware for express to enable opentracing. Supports any opentracing tracer compatible with version 0.11.0 of the opentracing javascript library.

Install

npm install --save tracing-middleware

Usage

E.g., using LightStep as your tracer:

import * as express from "express";
import middleware from "tracing-middleware";
import * as LightStep from "lightstep-tracer";

const lsTracer = LightStep.tracer({
  access_token   : 'foo',
  component_name : 'bar',
});

const app = express();
app.use(middleware({tracer: lsTracer}));

Options

The middleware function takes in an options object as its only argument.

const options = {
  tracer: [Tracer], // Defaults to the opentracing no-op tracer.
}
0.2.1

9 years ago

0.2.0

9 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago