Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shumsky/koa-zipkin
https://github.com/shumsky/koa-zipkin
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shumsky/koa-zipkin
- Owner: shumsky
- Created: 2017-09-30T23:25:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T23:42:42.000Z (almost 7 years ago)
- Last Synced: 2024-06-09T18:41:01.763Z (4 months ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# koa-zipkin
Zipkin middleware for Koa 2.x that traces incoming HTTP requests.
## Usage
```js
const Koa = require('koa');
const {Tracer, ConsoleRecorder, ExplicitContext} = require('zipkin');
const {zipkinMiddleware} = require('koa-zipkin');const recorder = new ConsoleRecorder();
const ctxImpl = new ExplicitContext();
const tracer = new Tracer({recorder, ctxImpl});
const app = new Koa();app.use(zipkinMiddleware({tracer, serviceName: 'zipkin-koa-demo', port: 3000}));
```