zipkin-instrumentation-koa-slim

1.0.0 • Public • Published

zipkin-instrumentation-koa

Koa middleware and instrumentation that adds Zipkin tracing to the application.

Koa Middleware

import * as Koa from 'koa';
import * as KoaInstrumentation from "zipkin-instrumentation-koa";
import {Tracer, ExplicitContext, ConsoleRecorder} from "zipkin";

const ctxImpl = new ExplicitContext();
const recorder = new ConsoleRecorder();
const tracer = new Tracer({ctxImpl, recorder}); // configure your tracer properly here

const app = new Koa();

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

Readme

Keywords

none

Package Sidebar

Install

npm i zipkin-instrumentation-koa-slim

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

22.7 kB

Total Files

26

Last publish

Collaborators

  • zephyr419