metrics: move Subsystem to constants
This commit is contained in:
@@ -6,36 +6,33 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
const promSubsystem = "shipper"
|
||||
|
||||
var (
|
||||
promShipperQueued = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
// Subsystem: "shipper",
|
||||
Name: "shipper_record", // "queued",
|
||||
Help: "Log records in queue to be batched and sent to database",
|
||||
Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
|
||||
Name: "shipper_record", // "queued",
|
||||
Help: "Log records in queue to be batched and sent to database",
|
||||
}, []string{"filename"})
|
||||
promShipperDbSent = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
// Subsystem: "shipper",
|
||||
Name: "record", // "sent",
|
||||
Help: "Log records successfully committed to database",
|
||||
Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
|
||||
Name: "record", // "sent",
|
||||
Help: "Log records successfully committed to database",
|
||||
}, []string{"filename"})
|
||||
promShipperBatchSizeResult = promauto.NewHistogram(prometheus.HistogramOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
// Subsystem: "shipper",
|
||||
Name: "bulk_submission_message", // "items_in_batch"
|
||||
Help: "Batch size for database submissions",
|
||||
Buckets: []float64{1, 5, 10, 50, 100, 500, 1000, 5000, 10000},
|
||||
Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
|
||||
Name: "bulk_submission_message", // "items_in_batch"
|
||||
Help: "Batch size for database submissions",
|
||||
Buckets: []float64{1, 5, 10, 50, 100, 500, 1000, 5000, 10000},
|
||||
})
|
||||
promShipperDbSendError = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
// Subsystem: "shipper",
|
||||
Name: "insertion_error", // "errors",
|
||||
Help: "Failed database bulk insertions",
|
||||
Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
|
||||
Name: "insertion_error", // "errors",
|
||||
Help: "Failed database bulk insertions",
|
||||
}, []string{"filename"})
|
||||
promShipperSynced = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: globals.PrometheusPrefix,
|
||||
Subsystem: "shipper",
|
||||
Name: "batches_synced",
|
||||
Help: "All batches available have been committed database (0 or 1)",
|
||||
Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
|
||||
Name: "batches_synced",
|
||||
Help: "All batches available have been committed database (0 or 1)",
|
||||
}, []string{"filename"})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user