Skip to content

Oximeter: add metric to track database insert errors.#10766

Open
jmcarp wants to merge 1 commit into
mainfrom
jmcarp/oximeter-insert-error-metric
Open

Oximeter: add metric to track database insert errors.#10766
jmcarp wants to merge 1 commit into
mainfrom
jmcarp/oximeter-insert-error-metric

Conversation

@jmcarp

@jmcarp jmcarp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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.

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.

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.
@jmcarp jmcarp requested a review from bnaecker July 8, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant