Add metrics to track string and container fields limited by length

This commit is contained in:
Tim Wojtulewicz 2025-07-30 09:43:45 -07:00
parent cd74a4e138
commit 837fde1a08
10 changed files with 71 additions and 5 deletions

View file

@ -2,9 +2,12 @@
#
# @TEST-EXEC: zeek -b test.zeek %INPUT
# @TEST-EXEC: btest-diff test.log
# @TEST-EXEC: btest-diff .stdout
# @TEST-START-FILE test.zeek
@load base/frameworks/telemetry
module Test;
export {
@ -32,6 +35,13 @@ event zeek_init()
}
Log::write(Test::LOG, rec);
local storage_metrics = Telemetry::collect_metrics("zeek", "log_writer_truncated*");
for (i in storage_metrics)
{
local m = storage_metrics[i];
print m$opts$metric_type, m$opts$prefix, m$opts$name, m$label_names, m$label_values, m$value;
}
}