FrankChen021 commented on code in PR #19525:
URL: https://github.com/apache/druid/pull/19525#discussion_r3317736326
##########
extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/KafkaConsumerMonitor.java:
##########
@@ -137,12 +136,23 @@ public class KafkaConsumerMonitor extends AbstractMonitor
).collect(Collectors.toMap(KafkaConsumerMetric::getKafkaMetricName,
Function.identity()));
private final KafkaConsumer<?, ?> consumer;
+
+ /**
+ * Supplies a new metric builder for each emitted metric.
+ */
+ @Nullable
+ private final Supplier<ServiceMetricEvent.Builder> metricBuilderSupplier;
+
private final Map<MetricName, AtomicLong> counters = new HashMap<>();
private final AtomicDouble pollIdleRatioAvg = new AtomicDouble(1.0d);
- public KafkaConsumerMonitor(final KafkaConsumer<?, ?> consumer)
+ public KafkaConsumerMonitor(
Review Comment:
[P2] Preserve the existing public constructor
This replaces the existing public KafkaConsumerMonitor(KafkaConsumer)
constructor with a two-argument signature. Any external extension or test code
compiled against the Kafka indexing-service artifact that instantiates the
monitor will fail to compile, or hit NoSuchMethodError when run with the
updated jar, even though passing null preserves the old behavior. Please keep a
one-argument overload that delegates to this constructor with a null supplier.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]