Skip to content

Commit 8d6ce05

Browse files
committed
Remove commented code
Signed-off-by: Joe Adams <[email protected]>
1 parent 799f3e1 commit 8d6ce05

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

cmd/postgres_exporter/probe.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,17 @@ func handleProbe(logger log.Logger, excludeDatabases []string) http.HandlerFunc
6161

6262
// TODO(@sysadmind): Timeout
6363

64-
// probeSuccessGauge := prometheus.NewGauge(prometheus.GaugeOpts{
65-
// Name: "probe_success",
66-
// Help: "Displays whether or not the probe was a success",
67-
// })
68-
// probeDurationGauge := prometheus.NewGauge(prometheus.GaugeOpts{
69-
// Name: "probe_duration_seconds",
70-
// Help: "Returns how long the probe took to complete in seconds",
71-
// })
72-
7364
tl := log.With(logger, "target", target)
7465

75-
// start := time.Now()
7666
registry := prometheus.NewRegistry()
77-
// registry.MustRegister(probeSuccessGauge)
78-
// registry.MustRegister(probeDurationGauge)
7967

8068
opts := []ExporterOpt{
8169
DisableDefaultMetrics(*disableDefaultMetrics),
8270
DisableSettingsMetrics(*disableSettingsMetrics),
8371
AutoDiscoverDatabases(*autoDiscoverDatabases),
8472
WithUserQueriesPath(*queriesPath),
8573
WithConstantLabels(*constantLabelsList),
86-
ExcludeDatabases(*excludeDatabases),
74+
ExcludeDatabases(excludeDatabases),
8775
IncludeDatabases(*includeDatabases),
8876
}
8977

collector/replication_slots.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ type PGReplicationSlotCollector struct {
2929
log log.Logger
3030
}
3131

32-
func NewPGReplicationSlotCollector(logger log.Logger) (Collector, error) {
33-
return &PGReplicationSlotCollector{log: logger}, nil
32+
func NewPGReplicationSlotCollector(config collectorConfig) (Collector, error) {
33+
return &PGReplicationSlotCollector{log: config.logger}, nil
3434
}
3535

3636
var pgReplicationSlot = map[string]*prometheus.Desc{

0 commit comments

Comments
 (0)