So I need to obtain some metrics from a database and I'm planning to create a custom collector as described here: http://prometheus.github.io/client_python/collector/custom/
I use asyncpg to connect to PostgreSQL. My problem though is that asyncpg query needs to be called from an async function and collect() is synchronous.
Is there an async equivalent? It looks like the client supports being used from ASGI.