Add analyzer pattern to 00002_log_and_exception_messages_formatting

This commit is contained in:
Nikolai Kochetov 2024-03-28 11:16:21 +00:00
parent bbf46e6e60
commit 4ad2c78afb

View File

@ -203,7 +203,7 @@ select
with 0.16 as threshold
select
'noisy Trace messages',
greatest(coalesce(((select message_format_string, count() from logs where level = 'Trace' and message_format_string not in ('Access granted: {}{}', '{} -> {}')
greatest(coalesce(((select message_format_string, count() from logs where level = 'Trace' and message_format_string not in ('Access granted: {}{}', '{} -> {}', 'Query {} to stage {}{}')
group by message_format_string order by count() desc limit 1) as top_message).2, 0) / (select count() from logs), threshold) as r,
r <= threshold ? '' : top_message.1;