Datadog natively collects hundreds of Postgres metrics: system resources, connections, locks, transactions, indexes, and more. Pre-built, fully customizable visualizations, alerts, and full-stack performance correlation. 14 day unlimited trial.
Hyperloglog is a very interesting algorithm and you can have an extremely efficient version directly in Postgres. And if you’re not up for building and pulling in your own extensions here’s a raw SQL implementation of it.