Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable filter fields #3485

Merged
merged 3 commits into from
Apr 1, 2021
Merged

Conversation

iilyak
Copy link
Contributor

@iilyak iilyak commented Mar 31, 2021

Overview

Do not log by default potentially long list of messages received by terminated process. Currently we log messages field in the termination report. This means that we try to process whole message queue of a process before we write the log entry.
An example of a log message we are trying to reduce is as follows:

Jan 13 20:18:22 c-fdbcore-perf-api-546dc8d4d8-6hx5n db error [error] 2021-01-13T20:18:22.322515Z [email protected] <0.381.0> -------- CRASH REPORT Process fabric2_txids (<0.381.0>) with 0 neighbors exited with reason: {bad_info,{#Ref<0.3875778607.1050673154.132562>,ready}} at gen_server:handle_common_reply/8(line:726) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {fabric2_txids,init,['Argument__1']}, ancestors: [fabric2_sup,<0.377.0>], message_queue_len: 1, messages: [{'$gen_cast',{remove,<<21,22,21,255,22,6,74,23,8,...>>}}], links: [<0.378.0>], dictionary: [{fdb_directory,[<<"perf">>]},{'$erlfdb_error',undefined},{'$fabric_db_handle',...}], trap_exit: false, status: running, heap_size: 6772, stack_size: 27, reductions: 348809

Testing recommendations

The regular make check should work. To run tests selectively you can use:

make eunit apps=couch_log tests=couch_log_config_test_

Related Issues or Pull Requests

N/A

Checklist

Copy link
Member

@bessbd bessbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, +1

true;

transform(filter_fields, FieldsStr) ->
Default = [pid, registered_name, error_info, messages],
Copy link
Member

@bessbd bessbd Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this maybe go to a define?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the approach in other functions of this module (see line 100 and 104).

@iilyak iilyak merged commit a085399 into apache:main Apr 1, 2021
@iilyak iilyak deleted the configurable_filter_fields branch April 1, 2021 17:58
@iilyak iilyak mentioned this pull request Apr 1, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants