Koa Devstack Sleuth
Koa middleware for traceability of requests, based on the spring sleuth headers
This middelware is a distributed tracing solution for Koa v2, borrowing heavily from Dapper.
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: ''qs:access_token: 'xxxxx xxxxx' // -> uri + '?access_token=xxxxx%20xxxxx'headers:'X-B3-SpanId': ctx'X-B3-TraceId': ctxjson: true // Automatically parses the JSON string in the response;;
If you want to use this library, you need at least node v.7 and Harmony.