strongloop/express — pull request #2437 by frankrousseau (2014-11-11 12:17:34+00:00)
Title: Add tracing capabilities to Express

Hi Express team,

To follow the discussion posted in the #2191 issue, I send you a proposal to implement tracing support in Express. Let me know if it matches your requirements. It is inspired by Koa Trace.

**Goal**

We want to allow to trace the response life-cycle. The tracing should support any tracing technology.

**Implementation**

* Add a `tracers` array at the application level.
* Add an `instrument` function on the application prototype to add tracer to the tracer list.
* Add a `dispatch` function on the application prototype to activate all set tracers.
* Add a `trace` on the response prototype to run tracers with current context and given event as arguments.
* Add tracing tests.
* Add tracing example.