You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2026/06/08 06:41:41 UTC
(kafka) branch trunk updated: MINOR: Remove unused maybeEmitMetric from MetricsEmitter (#22497)
This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 496ed665120 MINOR: Remove unused maybeEmitMetric from MetricsEmitter (#22497)
496ed665120 is described below
commit 496ed66512033ea3c5f7239cb0673894ea1a7a24
Author: majialong <ma...@gmail.com>
AuthorDate: Mon Jun 8 14:41:32 2026 +0800
MINOR: Remove unused maybeEmitMetric from MetricsEmitter (#22497)
Remove the unused `maybeEmitMetric` default method from
`MetricsEmitter`.
Reviewers: Ken Huang <s7...@gmail.com>, Chia-Ping Tsai
<ch...@gmail.com>
---
.../apache/kafka/common/telemetry/internals/MetricsEmitter.java | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/clients/src/main/java/org/apache/kafka/common/telemetry/internals/MetricsEmitter.java b/clients/src/main/java/org/apache/kafka/common/telemetry/internals/MetricsEmitter.java
index 005e6eb150e..3925726247c 100644
--- a/clients/src/main/java/org/apache/kafka/common/telemetry/internals/MetricsEmitter.java
+++ b/clients/src/main/java/org/apache/kafka/common/telemetry/internals/MetricsEmitter.java
@@ -71,15 +71,6 @@ public interface MetricsEmitter extends Closeable {
return List.of();
}
- /**
- * Emits a metric if {@link MetricsEmitter#shouldEmitMetric(MetricKeyable)} returns <tt>true</tt>.
- * @param metric to emit
- * @return true if emit is successful, false otherwise
- */
- default boolean maybeEmitMetric(SinglePointMetric metric) {
- return shouldEmitMetric(metric) && emitMetric(metric);
- }
-
/**
* Allows the {@code MetricsEmitter} implementation to initialize itself. This method should be invoked
* by the telemetry reporter before calls to {@link #emitMetric(SinglePointMetric)} are made.