InitMiddleware sets up the necessary middlewares for the microservice. These include middlewares to establish a sane context containing access to the configuration, worker queue, statsd client, and Sentry client (Raven). The latter two are disabled in debugging mode to avoid contaminating production stats. It will also set up a middleware for catching, and handling errors thrown from a route.

InitMiddleware is referenced in 1 repository