Skip to content

agreatfool/koa-zipkin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published