-
Notifications
You must be signed in to change notification settings - Fork 5
feat: config to opt in/out from meta fields #11
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
Conversation
7675414 to
356476a
Compare
rolkar-kivra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks nice.
You may consider my comments or not.
| To control what is being included in the log object from the metadata, there | ||
| are two ways. One can opt-out from fields. Default opts out is `[report_cb]`. | ||
|
|
||
| #{ meta_without => [report_cb, gl, file, domain] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need wild cards here.
At least "meta_without => all" or "meta_without => ['*'].
| are two ways. One can opt-out from fields. Default opts out is `[report_cb]`. | ||
|
|
||
| #{ meta_without => [report_cb, gl, file, domain] } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about nested keys? Like #{extras => #{foo => <<"smörgås">>}}.
meta_without = [{extras,foo}]
| Or for very detailed control there is instead opt-in. | ||
|
|
||
| #{ meta_with => [time, mfa, line, user_key, client_key] } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then you could do
meta_without = [extras]
meta_with = [{extras,foo}]
to only include foo from extras.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question
Do we need msg_without and msg_with ?
Or is that something that the application needs to handle itself?
|
One more comment. Maybe without = [{meta,extras}] It is more flexible |
meta_withoutA way to opt-out of fields from the meta object. A list of field names (often atoms). Default excludes report_cb
meta_withA way to opt-in of fields from the meta object. A list of field names (often atoms). Default is all fields remaining after opt-out.