From 8e3efcd32e249f36770a274bd0f721fbd4ca29f3 Mon Sep 17 00:00:00 2001 From: "rita.canavarro" Date: Wed, 5 Jul 2023 09:40:42 +0100 Subject: [PATCH] [FEAT] Metric definition Signed-off-by: rita.canavarro --- pkg/shipper/shipper.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/shipper/shipper.go b/pkg/shipper/shipper.go index 2a2c04df2d8..4dfed793437 100644 --- a/pkg/shipper/shipper.go +++ b/pkg/shipper/shipper.go @@ -38,6 +38,7 @@ type metrics struct { uploads prometheus.Counter uploadFailures prometheus.Counter uploadedCompacted prometheus.Gauge + uploadedBytes prometheus.Counter } func newMetrics(reg prometheus.Registerer, uploadCompacted bool) *metrics { @@ -68,6 +69,10 @@ func newMetrics(reg prometheus.Registerer, uploadCompacted bool) *metrics { } else { m.uploadedCompacted = promauto.With(nil).NewGauge(uploadCompactedGaugeOpts) } + m.uploadedBytes = promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "thanos_shipper_uploaded_bytes_total", + Help: "Total number of uploaded bytes", + }) return &m }