Skip to content

Commit 8f58df6

Browse files
authored
chore: rename dataobj consumer metrics (#17830)
1 parent 8001bee commit 8f58df6

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

pkg/dataobj/consumer/metrics.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ type partitionOffsetMetrics struct {
2525

2626
// Data volume metrics
2727
bytesProcessed prometheus.Counter
28-
bytesPerSecond prometheus.Gauge
2928
}
3029

3130
func newPartitionOffsetMetrics() *partitionOffsetMetrics {
@@ -58,10 +57,6 @@ func newPartitionOffsetMetrics() *partitionOffsetMetrics {
5857
Name: "loki_dataobj_consumer_bytes_processed_total",
5958
Help: "Total number of bytes processed from this partition",
6059
}),
61-
bytesPerSecond: prometheus.NewGauge(prometheus.GaugeOpts{
62-
Name: "loki_dataobj_consumer_bytes_per_second",
63-
Help: "Current rate of bytes being processed from this partition",
64-
}),
6560
}
6661

6762
p.currentOffset = prometheus.NewGaugeFunc(
@@ -86,7 +81,6 @@ func (p *partitionOffsetMetrics) register(reg prometheus.Registerer) error {
8681
p.currentOffset,
8782
p.processingDelay,
8883
p.bytesProcessed,
89-
p.bytesPerSecond,
9084
}
9185

9286
for _, collector := range collectors {
@@ -106,7 +100,6 @@ func (p *partitionOffsetMetrics) unregister(reg prometheus.Registerer) {
106100
p.currentOffset,
107101
p.processingDelay,
108102
p.bytesProcessed,
109-
p.bytesPerSecond,
110103
}
111104

112105
for _, collector := range collectors {
@@ -143,5 +136,4 @@ func (p *partitionOffsetMetrics) observeProcessingDelay(recordTimestamp time.Tim
143136

144137
func (p *partitionOffsetMetrics) addBytesProcessed(bytes int64) {
145138
p.bytesProcessed.Add(float64(bytes))
146-
p.bytesPerSecond.Set(float64(bytes)) // This is a simple implementation - you might want to use a more sophisticated rate calculation
147139
}

0 commit comments

Comments
 (0)