koajs / trace

generic tracing for koa
MIT License
53 stars 4 forks source link

Support koa 2 #7

Closed doug-wade closed 5 years ago

doug-wade commented 6 years ago

In https://github.com/koajs/koala/issues/17, I tried to get koa-trace working with koa 2, and I can't seem to swing it. I get an error where context is not defined when the trace is ended, at the tail end of the request. I think there may be some work to do to support koa 2, but I haven't done enough digging to know what that is just yet.

haoxins commented 6 years ago

PR welcome ! 👍

haoxins commented 5 years ago

Should work fine with v2 IMO.

https://github.com/koajs/trace/blob/master/example.js