From 82c914c11d8d068c149b28d0018d24099cd59ddd Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 24 Apr 2024 09:30:29 +0200 Subject: [PATCH] fix(falco_metrics): make duration_sec a count and not a timestamp The output will thus be a total which is what this metrics is. Signed-off-by: Samuel Gaist --- userspace/falco/falco_metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/falco/falco_metrics.cpp b/userspace/falco/falco_metrics.cpp index ed88e1c7..4d11534e 100644 --- a/userspace/falco/falco_metrics.cpp +++ b/userspace/falco/falco_metrics.cpp @@ -117,7 +117,7 @@ std::string falco_metrics::to_text(const falco::app::state& state) static_metrics.push_back(libs_metrics_collector.new_metric("duration_sec", METRICS_V2_MISC, METRIC_VALUE_TYPE_U64, - METRIC_VALUE_UNIT_TIME_TIMESTAMP_NS, + METRIC_VALUE_UNIT_TIME_S_COUNT, METRIC_VALUE_METRIC_TYPE_NON_MONOTONIC_CURRENT, (uint64_t)((now - agent_info->start_ts_epoch) / ONE_SECOND_IN_NS)));