Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agreatfool/koa-zipkin


https://github.com/agreatfool/koa-zipkin

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

# zipkin-instrumentation-koa

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

## Koa Middleware

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