Add with-analysis middleware.