Koa Devstack Sleuth
Koa middleware for traceability of requests, based on the spring sleuth headers
Usage
This middelware is a distributed tracing solution for Koa v2, borrowing heavily from Dapper.
Example
var koa = ;var sleuth = ;var app = ;app;
However if you want to use in microservices, in this version of koa-devstack-sleuth, you need add the header before call to other microservices. If you use request-promise see example below:
var options = uri: 'https://api.github.com/user/repos' qs: access_token: 'xxxxx xxxxx' // -> uri + '?access_token=xxxxx%20xxxxx' headers: 'X-B3-SpanId': ctx 'X-B3-TraceId': ctx json: true // Automatically parses the JSON string in the response; ;
Additional Information
If you want to use this library, you need at least node v.7 and Harmony.