You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "apoorvmittal10 (via GitHub)" <gi...@apache.org> on 2025/07/14 18:32:22 UTC
Re: [PR] KAFKA-19504: Remove unused metrics reporter initialization in KafkaAdminClient [kafka]
apoorvmittal10 commented on code in PR #20166:
URL: https://github.com/apache/kafka/pull/20166#discussion_r2205559646
##########
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java:
##########
@@ -627,9 +627,7 @@ private KafkaAdminClient(AdminClientConfig config,
CommonClientConfigs.RETRY_BACKOFF_EXP_BASE,
retryBackoffMaxMs,
CommonClientConfigs.RETRY_BACKOFF_JITTER);
- List<MetricsReporter> reporters = CommonClientConfigs.metricsReporters(this.clientId, config);
this.clientTelemetryReporter = clientTelemetryReporter;
- this.clientTelemetryReporter.ifPresent(reporters::add);
Review Comment:
one of the `createInternal` method do configure `Optional<ClientTelemetryReporter> clientTelemetryReporter = CommonClientConfigs.telemetryReporter(clientId, config);` but never add that to the reporters list. So do we need to not have `clientTelemetryReporter` there and pass `Optional.empty()` to `new KafkaAdminClient`?
https://github.com/apache/kafka/blob/a61a37f7dd2afe692fdbee6bf14f9ee4e0d1307e/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java#L582
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org