Skip to content

Commit

Permalink
KAFKA-17749: Fix Throttler metrics name
Browse files Browse the repository at this point in the history
Reviewers: Colin P. McCabe <[email protected]>
  • Loading branch information
mimaison authored and cmccabe committed Oct 10, 2024
1 parent 4878174 commit 44f15cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/upgrade.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ <h5><a id="upgrade_390_notable" href="#upgrade_390_notable">Notable changes in 3
See <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-956+Tiered+Storage+Quotas">KIP-956</a> for more details.</li>
</ul>
</li>
<li>In 3.8.0 the <code>kafka.utils.Thottler</code> metric was accidentally renamed to <code>org.apache.kafka.storage.internals.utils.Throttler</code>.
This change has been reverted and the metric is now named <code>kafka.utils.Thottler</code> again.
</li>
</ul>

<h4><a id="upgrade_3_8_0" href="#upgrade_3_8_0">Upgrading to 3.8.0 from any version 0.8.x through 3.7.x</a></h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public Throttler(double desiredRatePerSec,
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();
}
Expand Down

0 comments on commit 44f15cc

Please sign in to comment.