Merge pull request #48467 from ClickHouse/tavplubix-patch-6

Update 00002_log_and_exception_messages_formatting.sql
This commit is contained in:
Alexander Tokmakov 2023-04-06 13:50:31 +03:00 committed by GitHub
commit 005f233848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
runtime messages 0.001
runtime exceptions 0.05
messages shorter than 10 0
messages shorter than 16 2
messages shorter than 10 1
messages shorter than 16 3
exceptions shorter than 30 27
noisy messages 0.3
noisy Trace messages 0.16

View File

@ -53,10 +53,10 @@ create temporary table known_short_messages (s String) as select * from (select
] as arr) array join arr;
-- Check that we don't have too many short meaningless message patterns.
select 'messages shorter than 10', max2(countDistinctOrDefault(message_format_string), 0) from logs where length(message_format_string) < 10 and message_format_string not in known_short_messages;
select 'messages shorter than 10', max2(countDistinctOrDefault(message_format_string), 1) from logs where length(message_format_string) < 10 and message_format_string not in known_short_messages;
-- Same as above. Feel free to update the threshold or remove this query if really necessary
select 'messages shorter than 16', max2(countDistinctOrDefault(message_format_string), 2) from logs where length(message_format_string) < 16 and message_format_string not in known_short_messages;
select 'messages shorter than 16', max2(countDistinctOrDefault(message_format_string), 3) from logs where length(message_format_string) < 16 and message_format_string not in known_short_messages;
-- Same as above, but exceptions must be more informative. Feel free to update the threshold or remove this query if really necessary
select 'exceptions shorter than 30', max2(countDistinctOrDefault(message_format_string), 27) from logs where length(message_format_string) < 30 and message ilike '%DB::Exception%' and message_format_string not in known_short_messages;