metrics: move Subsystem to constants
This commit is contained in:
@@ -6,28 +6,26 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
const promSubsystem = "file"
|
||||
|
||||
var (
|
||||
promFileInitialSeekSkipped = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
// Subsystem: "file",
|
||||
Name: "skipped_bytes",
|
||||
Help: "Bytes skipped in file after discovering",
|
||||
Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
|
||||
Name: "skipped_bytes",
|
||||
Help: "Bytes skipped in file after discovering",
|
||||
}, []string{"filename"})
|
||||
promFileCatchupDone = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
Subsystem: "file",
|
||||
Name: "catchupped",
|
||||
Help: "(0 or) 1 if initial backlog has been sent; (total <= watcher_file_count)",
|
||||
Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
|
||||
Name: "catchupped",
|
||||
Help: "(0 or) 1 if initial backlog has been sent; (total <= watcher_file_count)",
|
||||
}, []string{"filename"})
|
||||
promFileErr = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
Subsystem: "file",
|
||||
Name: "errors_count",
|
||||
Help: "Errors while reading file",
|
||||
Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
|
||||
Name: "errors_count",
|
||||
Help: "Errors while reading file",
|
||||
}, []string{"filename"})
|
||||
promFileLineSize = promauto.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
// Subsystem: "file",
|
||||
Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
|
||||
Name: "line_size_bytes",
|
||||
Help: "Log line size in bytes",
|
||||
Buckets: []float64{80, 160, 320, 640, 1280},
|
||||
|
Reference in New Issue
Block a user