Fix up collector registration (#812)
Use const definitions to make collector registration consistent. * Use collector subsystem name consistently. * Fix up replication metric name unit. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
@@ -21,16 +21,16 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
const processIdleSubsystem = "process_idle"
|
||||
|
||||
func init() {
|
||||
registerCollector("statements", defaultEnabled, NewPGProcessIdleCollector)
|
||||
registerCollector(processIdleSubsystem, defaultEnabled, NewPGProcessIdleCollector)
|
||||
}
|
||||
|
||||
type PGProcessIdleCollector struct {
|
||||
log log.Logger
|
||||
}
|
||||
|
||||
const processIdleSubsystem = "process_idle"
|
||||
|
||||
func NewPGProcessIdleCollector(config collectorConfig) (Collector, error) {
|
||||
return &PGProcessIdleCollector{log: config.logger}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user