KAFKA-17749: Fix Throttler metrics name (#17430)

Reviewers: Josep Prat <josep.prat@aiven.io>
This commit is contained in:
Mickael Maison 2024-10-10 17:25:59 +02:00 committed by GitHub
parent 52017a83db
commit dcd3bbe592
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ public class Throttler {
Time time) {
this.desiredRatePerSec = desiredRatePerSec;
this.checkIntervalNs = TimeUnit.MILLISECONDS.toNanos(checkIntervalMs);
this.meter = new KafkaMetricsGroup(Throttler.class).newMeter(metricName, units, TimeUnit.SECONDS);
// For compatibility - this metrics group was previously defined within a Scala class named `kafka.utils.Throttler`
this.meter = new KafkaMetricsGroup("kafka.utils", "Throttler").newMeter(metricName, units, TimeUnit.SECONDS);
this.time = time;
this.periodStartNs = time.nanoseconds();
}