cadonna commented on code in PR #12985: URL: https://github.com/apache/kafka/pull/12985#discussion_r1052198261
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java: ########## @@ -159,7 +159,8 @@ public <K, V> void send(final String topic, final Set<Integer> multicastPartitions = maybeMulticastPartitions.get(); if (multicastPartitions.isEmpty()) { // If a record is not to be sent to any partition, mark it as a dropped record. - log.debug("Not sending the record with key {} , value {} to any partition", key, value); + log.warn("Skipping record as partitioner returned empty partitions. " Review Comment: I think, we should never log keys and values on any log level. Since the provider of the Streams service might not own the data, but might be able to change the log level, having keys and values in the logs seems a security risk to me. Regarding, debug vs. warn vs. trace here. In other places, we use warn log messages when records are dropped since the dropped records metric does not contain any information about why the record was dropped. However, in this case I understand -- and correct me if I am wrong -- that the partitioner might drop records on purpose. So having a warn log message for each record seems not appropriate. Still it would be great to have some kind of logging. Maybe some regular summary (e.g., for the first 10 records and then every 100 records and then on larger intervals?) or indeed logging at trace level. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org