Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agreatfool/koa-zipkin
https://github.com/agreatfool/koa-zipkin
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/agreatfool/koa-zipkin
- Owner: agreatfool
- License: mit
- Created: 2017-09-11T06:21:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-27T10:06:23.000Z (over 6 years ago)
- Last Synced: 2024-04-13T03:18:14.851Z (7 months ago)
- Language: TypeScript
- Size: 20.5 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 hereconst app = new Koa();
// Add the Zipkin middleware
app.use(KoaInstrumentation.middleware({tracer}));
```