postgres_exporter/cmd/postgres_exporter
Yann Soubeyrand 8c27e97b77
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>
2020-12-25 02:37:31 +11:00
..
tests Introduce histogram support () 2020-12-25 02:34:26 +11:00
pg_setting_test.go multi-server-exporter multi server exporter is introduced 2018-12-19 01:46:45 +11:00
pg_setting.go multi-server-exporter multi server exporter is introduced 2018-12-19 01:46:45 +11:00
postgres_exporter_integration_test.go Introduce histogram support () 2020-12-25 02:34:26 +11:00
postgres_exporter_test.go Introduce histogram support () 2020-12-25 02:34:26 +11:00
postgres_exporter.go Do not try to return metric descriptors in Describe () 2020-12-25 02:37:31 +11:00