Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Postgres: Prioritize collection of size metrics on larger tables
The `max_relations` parameter (https://github.com/DataDog/integrations-core/blob/cf923f4aa3e63d/postgres/datadog_checks/postgres/data/conf.yaml.example#L160-L163) limits the number of relations that metrics are collected on. Previously, no order was specified, which meant that the metrics that were reported depedended on the vagaries of Postgres. This change orders the query by total table size because people are more likely to care about size-related metrics for larger tables than for smaller ones. There are exceptions, but even so, collecting metrics for the largest N tables seems more useful than collecting metrics for an unspecified subset of N tables.
- Loading branch information