feat(perf) Add latency metrics to the messages coming from the commit log #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lately we observed weird temporary increases in subscriptions consumer latency on selected partitions.
It is hard to understand exactly who is causing them.
One theory is that somehow the commit log messages could be delayed or could be processed too late by the subscriptions consumer.
Adding latency metrics to the code that consumes the commit log to rule out this hypothesis.
Specifically we record both the difference between the current time and the broker time the commit log message was produced at and the difference between the current time and the broker timestamp of the last message the commit log messages refers to.
The first gives us an indication if the commit log messages are late.
The second gives us an indication if the main consumer is consuming old messages.