Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Minor improve metrics logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Sep 17, 2021
1 parent 8d9dbb0 commit a69967c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,14 @@ public long streamingMilliSecondsBehindSource() {
}
}

public void logMetrics() {
LOGGER.info("Debezium Metrics:" +
" snapshotCompleted=" + this.snapshotCompleted() +
" snapshotRunning=" + this.snapshotRunning() +
" streamingQueueCurrentSize=" + this.streamingQueueCurrentSize() +
" streamingQueueRemainingCapacity=" + this.streamingQueueRemainingCapacity() +
" maxQueueSize=" + this.maxQueueSize +
" streamingMilliSecondsBehindSource=" + this.streamingMilliSecondsBehindSource()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ public void waitMs(Integer numRecordsProcessed, Integer processingTimeMs) throws
final int streamingSecondsBehindSource = (int) (debeziumMetrics.streamingMilliSecondsBehindSource() / 1000);
final boolean snapshotCompleted = debeziumMetrics.snapshotCompleted();

LOGGER.debug("Processed {}, QueueCurrentSize:{}, QueueTotalCapacity:{}, SecondsBehindSource:{}, SnapshotCompleted:{}",
numRecordsProcessed, streamingQueueCurrentSize, maxQueueSize, streamingSecondsBehindSource, snapshotCompleted
LOGGER.debug("Processed {}, QueueCurrentSize:{}, QueueTotalCapacity:{}, SecondsBehindSource:{}, " +
"SnapshotCompleted:{}, snapshotRunning:{}",
numRecordsProcessed, streamingQueueCurrentSize, maxQueueSize, streamingSecondsBehindSource, snapshotCompleted,
debeziumMetrics.snapshotRunning()
);

int totalWaitMs = 0;
Expand Down

0 comments on commit a69967c

Please sign in to comment.