Oximeter: add metric to track database insert errors.#10766
Open
jmcarp wants to merge 1 commit into
Open
Conversation
When oximeter fails to insert a batch of samples into clickhouse, it logs a warning. However, operators/support would have to check those logs, or notice gaps in metrics, in order to detect that database writes are failing. Operators will probably notice if clickhouse is totally unavailable, but sporadic failed writes would be harder to detect. This patch adds an `oximeter_collector:database_inserts_failed` metric that counts the total number of failed clickhouse inserts. As for related self-stats metrics, we obviously can't write this metric to clickhouse if clickhouse is unavailable. But if clickhouse is merely degraded, or temporarily unavailable, the metric will eventually come through. Part of #10552.
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.
When oximeter fails to insert a batch of samples into clickhouse, it logs a warning. However, operators/support would have to check those logs, or notice gaps in metrics, in order to detect that database writes are failing. Operators will probably notice if clickhouse is totally unavailable, but sporadic failed writes would be harder to detect.
This patch adds an
oximeter_collector:database_inserts_failedmetric that counts the total number of failed clickhouse inserts. As for related self-stats metrics, we obviously can't write this metric to clickhouse if clickhouse is unavailable. But if clickhouse is merely degraded, or temporarily unavailable, the metric will eventually come through.Part of #10552.
Note: I think this is the last thing I wanted to get done before closing #10552. I think I'll file a separate issue for sizing the database_batcher queue, but that should be easier to think about once this set of metrics lands in a release, and we can look at production data more easily.