1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: header for oom_errors_total (#3043)

This commit is contained in:
Roman Gershman 2024-05-13 14:00:47 +03:00 committed by GitHub
parent 5bf7e3b146
commit 6b8a8b6410
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1090,6 +1090,8 @@ void PrintPrometheusMetrics(const Metrics& m, StringResponse* resp) {
&resp->body());
if (m.events.insertion_rejections | m.coordinator_stats.oom_error_cmd_cnt) {
AppendMetricHeader("oom_errors_total", "Rejected requests due to out of memory errors",
MetricType::COUNTER, &resp->body());
AppendMetricValue("oom_errors_total", m.events.insertion_rejections, {"type"}, {"insert"},
&resp->body());
AppendMetricValue("oom_errors_total", m.coordinator_stats.oom_error_cmd_cnt, {"type"}, {"cmd"},