Oximeter: add a metric to record samples dropped in the database batc…#10683
Open
jmcarp wants to merge 1 commit into
Open
Oximeter: add a metric to record samples dropped in the database batc…#10683jmcarp wants to merge 1 commit into
jmcarp wants to merge 1 commit into
Conversation
…her. Oximeter sends samples from all collection tasks to a shared database batcher, which then inserts samples into clickhouse. The database batcher uses a bounded queue that drops old samples when adding a new sample would overflow the queue. We currently log a warning when dropping an old sample, but operators would have to proactively check those logs in order to notice data loss via this queue. To make dropped samples more visible, this patches introduces a new oximeter metric that counts the number of dropped samples in the database batcher. Note: if the batcher isn't able to push samples to the database at all, we won't be able to record the new metric! However, we write the new metric at the head of the queue, and dropped sample counts persist for the lifetime of the oximeter agent, so we'll be able to push metrics unless the queue is wildly oversaturated. Part of #10552.
9d99a2e to
57f5802
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…her.
Oximeter sends samples from all collection tasks to a shared database batcher, which then inserts samples into clickhouse. The database batcher uses a bounded queue that drops old samples when adding a new sample would overflow the queue. We currently log a warning when dropping an old sample, but operators would have to proactively check those logs in order to notice data loss via this queue. To make dropped samples more visible, this patches introduces a new oximeter metric that counts the number of dropped samples in the database batcher.
Note: if the batcher isn't able to push samples to the database at all, we won't be able to record the new metric! However, we write the new metric at the head of the queue, and dropped sample counts persist for the lifetime of the oximeter agent, so we'll be able to push metrics unless the queue is wildly oversaturated.
Part of #10552.