The instrumentation middleware was being created in a http request handler. This creates various measurements that remain in memory causing a leak.
Prometheus metrics before and after the fix:
Fixes #2729+