Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not try to return metric descriptors in Describe
Since we cannot know in advance the metrics which the exporter will generate, the workaround is to run a Collect and return the metric descriptors. This is problematic when the connection to the PostgreSQL instance cannot be established straight from the start. This patch makes Describe return no descriptors, effectively turning the collector in an unchecked one, which we're in the typical use case here: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus?tab=doc#hdr-Custom_Collectors_and_constant_Metrics. Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
- Loading branch information