@@ -25,7 +25,6 @@ type partitionOffsetMetrics struct {
25
25
26
26
// Data volume metrics
27
27
bytesProcessed prometheus.Counter
28
- bytesPerSecond prometheus.Gauge
29
28
}
30
29
31
30
func newPartitionOffsetMetrics () * partitionOffsetMetrics {
@@ -58,10 +57,6 @@ func newPartitionOffsetMetrics() *partitionOffsetMetrics {
58
57
Name : "loki_dataobj_consumer_bytes_processed_total" ,
59
58
Help : "Total number of bytes processed from this partition" ,
60
59
}),
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
- }),
65
60
}
66
61
67
62
p .currentOffset = prometheus .NewGaugeFunc (
@@ -86,7 +81,6 @@ func (p *partitionOffsetMetrics) register(reg prometheus.Registerer) error {
86
81
p .currentOffset ,
87
82
p .processingDelay ,
88
83
p .bytesProcessed ,
89
- p .bytesPerSecond ,
90
84
}
91
85
92
86
for _ , collector := range collectors {
@@ -106,7 +100,6 @@ func (p *partitionOffsetMetrics) unregister(reg prometheus.Registerer) {
106
100
p .currentOffset ,
107
101
p .processingDelay ,
108
102
p .bytesProcessed ,
109
- p .bytesPerSecond ,
110
103
}
111
104
112
105
for _ , collector := range collectors {
@@ -143,5 +136,4 @@ func (p *partitionOffsetMetrics) observeProcessingDelay(recordTimestamp time.Tim
143
136
144
137
func (p * partitionOffsetMetrics ) addBytesProcessed (bytes int64 ) {
145
138
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
147
139
}
0 commit comments