Flask extension to provide query metrics in headers and logs