From 815af4068b4ea8da5e11248b15a24fdc6db6c03f Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 24 Apr 2024 10:50:29 +0200 Subject: [PATCH] fix(falco_metrics): make duration_sec and outputs_queue_num_drops monotonic Signed-off-by: Samuel Gaist --- userspace/falco/falco_metrics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/falco/falco_metrics.cpp b/userspace/falco/falco_metrics.cpp index 4d11534e44e..af59efac779 100644 --- a/userspace/falco/falco_metrics.cpp +++ b/userspace/falco/falco_metrics.cpp @@ -109,7 +109,7 @@ std::string falco_metrics::to_text(const falco::app::state& state) METRICS_V2_MISC, METRIC_VALUE_TYPE_U64, METRIC_VALUE_UNIT_COUNT, - METRIC_VALUE_METRIC_TYPE_NON_MONOTONIC_CURRENT, + METRIC_VALUE_METRIC_TYPE_MONOTONIC, state.outputs->get_outputs_queue_num_drops())); auto now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); @@ -118,7 +118,7 @@ std::string falco_metrics::to_text(const falco::app::state& state) METRICS_V2_MISC, METRIC_VALUE_TYPE_U64, METRIC_VALUE_UNIT_TIME_S_COUNT, - METRIC_VALUE_METRIC_TYPE_NON_MONOTONIC_CURRENT, + METRIC_VALUE_METRIC_TYPE_MONOTONIC, (uint64_t)((now - agent_info->start_ts_epoch) / ONE_SECOND_IN_NS))); for (auto metrics: static_metrics)