Middleware that exposes req.metric for logging in the context of a user