You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/09/04 14:50:34 UTC
[GitHub] [kafka] vvcephei commented on a diff in pull request #12020: KAFKA-13818: Add generation to consumer assignor logs
vvcephei commented on code in PR #12020:
URL: https://github.com/apache/kafka/pull/12020#discussion_r962326811
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java:
##########
@@ -164,13 +166,23 @@ public ConsumerCoordinator(GroupRebalanceConfig rebalanceConfig,
metricGrpPrefix,
time);
this.rebalanceConfig = rebalanceConfig;
- this.log = logContext.logger(ConsumerCoordinator.class);
+ final Supplier<String> dynamicPrefix =
+ () -> logContext.logPrefix() + "[generationId=" + generation().generationId + "] ";
+ this.log = new DynamicPrefixLogger(
+ dynamicPrefix,
+ LoggerFactory.getLogger(ConsumerCoordinator.class)
+ );
Review Comment:
Thanks, @C0urante !
I think for now, I'd like to keep the change on the client side of the protocol only. The main intent of this change is to make it easier to see what's happening with rebalances on the client side, and I'm also a little concerned about the performance impact of this code on the broker.
Perf is not as concerning on the client side because a single consumer group spends most of its time processing and only occasionally performs a rebalance. In contrast, a broker managing a lot of consumer groups may spend a lot more time logging these messages.
--
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