Log e2e latency at debugging levelˆ

This commit is contained in:
Massimiliano Mirelli 2023-02-23 14:35:48 +02:00
parent 675f1c99df
commit c516baaedd

View File

@ -116,10 +116,11 @@ public class OpTimeTrackKafkaConsumer extends OpTimeTrackKafkaClient {
if (record != null) { if (record != null) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug( logger.debug(
"Receiving message is successful: [{}] - offset({}), cycle ({})", "Receiving message is successful: [{}] - offset({}), cycle ({}), e2e_latency_ms({})",
printRecvedMsg(record), printRecvedMsg(record),
record.offset(), record.offset(),
cycle); cycle,
System.currentTimeMillis() - record.timestamp());
} }
if (!autoCommitEnabled) { if (!autoCommitEnabled) {