Skip to content

Commit

Permalink
[FEAT] Metric definition
Browse files Browse the repository at this point in the history
Signed-off-by: rita.canavarro <[email protected]>
  • Loading branch information
rita.canavarro committed Jul 11, 2023
1 parent 1dcbd7a commit af841d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/shipper/shipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit af841d0

Please sign in to comment.