Merge branch 'topic/awelzel/no-telemetry-log-in-external-baselines'

* topic/awelzel/no-telemetry-log-in-external-baselines:
  testing/external: Exclude telemetry.log from baselines
This commit is contained in:
Arne Welzel 2023-08-30 11:24:51 +02:00
commit 4b71b7d05c
6 changed files with 16 additions and 35 deletions

12
CHANGES
View file

@ -1,3 +1,15 @@
6.1.0-dev.356 | 2023-08-30 11:24:51 +0200
* testing/external: Exclude telemetry.log from baselines (Arne Welzel, Corelight)
The diffs produced by telemetry.log when introducing a weird or
removing/adding protocol specific logs is overwhelming and distracting
without providing value. Exclude telemetry.log similar to how we already
exclude stats.log.
Some more targeted telemetry.log tests exists in the normal testing/btest
suite and that appears more sensible.
6.1.0-dev.354 | 2023-08-29 12:13:51 -0700 6.1.0-dev.354 | 2023-08-29 12:13:51 -0700
* Forward OpenSSL include path to plugins (Dominik Charousset, Corelight) * Forward OpenSSL include path to plugins (Dominik Charousset, Corelight)

View file

@ -1 +1 @@
6.1.0-dev.354 6.1.0-dev.356

View file

@ -1 +1 @@
cfc57a8a0513d8651c8946739e13ee0d8cfaad52 05af330a994b192cefecb00dcaf78ad8f7cb5ab2

View file

@ -1 +1 @@
4046d6322e1435851c4b17f9b6dfba63481e7e2b e2bcf374b7f03f95f7280568eab31600d58812ae

View file

@ -22,7 +22,7 @@ files_cwd=$(ls $@)
files_baseline=$(cd $TEST_BASELINE && ls $@) files_baseline=$(cd $TEST_BASELINE && ls $@)
for i in $(echo $files_cwd $files_baseline | sort | uniq); do for i in $(echo $files_cwd $files_baseline | sort | uniq); do
if [[ "$i" != "loaded_scripts.log" && "$i" != "prof.log" && "$i" != "debug.log" && "$i" != "stats.log" && "$i" != broker_*.log ]]; then if [[ "$i" != "loaded_scripts.log" && "$i" != "prof.log" && "$i" != "debug.log" && "$i" != "stats.log" && "$i" != broker_*.log && "$i" != "telemetry.log" ]]; then
if [[ "$i" == "reporter.log" ]]; then if [[ "$i" == "reporter.log" ]]; then
# Do not diff the reporter.log if it only complains about missing # Do not diff the reporter.log if it only complains about missing

View file

@ -13,37 +13,6 @@
redef LogAscii::use_json = F; redef LogAscii::use_json = F;
@endif @endif
# Exclude process metrics, they are non-deterministic.
redef Telemetry::log_prefixes -= { "process" };
# Increase default telemetry.log 30x to reduce log size
# for traces spanning a long time period.
redef Telemetry::log_interval = 1800sec;
# Prevent the version_info metric from being logged as it's not deterministic.
hook Telemetry::log_policy(rec: Telemetry::Info, id: Log::ID, filter: Log::Filter)
{
if ( rec$prefix == "zeek" && rec$name == "version_info" )
break;
}
hook Telemetry::log_policy(rec: Telemetry::Info, id: Log::ID, filter: Log::Filter)
{
if ( rec$prefix != "zeek" )
return;
# Filter all event-handler-invocations entries from telemetry.log
# except those having something to do with connection_*
if ( rec$name == "event-handler-invocations" && /connection_.*/ !in cat(rec$label_values) )
break;
# Filter out the LoadedScripts stream due to platform dependent
# difference in the scripts loaded, and also filter out Telemetry
# log counts.
if ( rec$name == /log-.*/ && /LoadedScripts::LOG|Telemetry::LOG/ in cat(rec$label_values) )
break;
}
# The IMAP analyzer includes absolute filenames in its error messages, # The IMAP analyzer includes absolute filenames in its error messages,
# exclude it for now from analyzer.log. # exclude it for now from analyzer.log.
# https://github.com/zeek/zeek/issues/2659 # https://github.com/zeek/zeek/issues/2659