Skip to content

Commit

Permalink
fix(falco_metrics): make duration_sec a count and not a timestamp
Browse files Browse the repository at this point in the history
The output will thus be a total which is what this metrics is.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
  • Loading branch information
sgaist committed Apr 24, 2024
1 parent 494ecc2 commit 934df4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/falco/falco_metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

Expand Down

0 comments on commit 934df4c

Please sign in to comment.