diff --git a/cmd/postgres_exporter/probe.go b/cmd/postgres_exporter/probe.go index 6f0e8b8a..2a7b29ec 100644 --- a/cmd/postgres_exporter/probe.go +++ b/cmd/postgres_exporter/probe.go @@ -61,21 +61,9 @@ func handleProbe(logger log.Logger, excludeDatabases []string) http.HandlerFunc // TODO(@sysadmind): Timeout - // probeSuccessGauge := prometheus.NewGauge(prometheus.GaugeOpts{ - // Name: "probe_success", - // Help: "Displays whether or not the probe was a success", - // }) - // probeDurationGauge := prometheus.NewGauge(prometheus.GaugeOpts{ - // Name: "probe_duration_seconds", - // Help: "Returns how long the probe took to complete in seconds", - // }) - tl := log.With(logger, "target", target) - // start := time.Now() registry := prometheus.NewRegistry() - // registry.MustRegister(probeSuccessGauge) - // registry.MustRegister(probeDurationGauge) opts := []ExporterOpt{ DisableDefaultMetrics(*disableDefaultMetrics), @@ -83,7 +71,7 @@ func handleProbe(logger log.Logger, excludeDatabases []string) http.HandlerFunc AutoDiscoverDatabases(*autoDiscoverDatabases), WithUserQueriesPath(*queriesPath), WithConstantLabels(*constantLabelsList), - ExcludeDatabases(*excludeDatabases), + ExcludeDatabases(excludeDatabases), IncludeDatabases(*includeDatabases), } diff --git a/collector/replication_slots.go b/collector/replication_slots.go index 224db3cc..ed37441c 100644 --- a/collector/replication_slots.go +++ b/collector/replication_slots.go @@ -29,8 +29,8 @@ type PGReplicationSlotCollector struct { log log.Logger } -func NewPGReplicationSlotCollector(logger log.Logger) (Collector, error) { - return &PGReplicationSlotCollector{log: logger}, nil +func NewPGReplicationSlotCollector(config collectorConfig) (Collector, error) { + return &PGReplicationSlotCollector{log: config.logger}, nil } var pgReplicationSlot = map[string]*prometheus.Desc{