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
add FILTER_METRICS_ACCESS_LOGS flag that allows to silence metrics ac… #2337
add FILTER_METRICS_ACCESS_LOGS flag that allows to silence metrics ac… #2337
Conversation
Thu Aug 27 16:46:13 UTC 2020 impatient try |
Thu Aug 27 16:47:15 UTC 2020 impatient try |
/test integration |
Thu Aug 27 17:25:15 UTC 2020 impatient try |
python/seldon_core/microservice.py
Outdated
@@ -188,6 +195,11 @@ def setup_logger(log_level: str) -> logging.Logger: | |||
flask_logger = logging.getLogger("werkzeug") | |||
flask_logger.setLevel(log_level_num) | |||
|
|||
if getenv_as_bool(FILTER_METRICS_ACCESS_LOGS_ENV_NAME, default=False): |
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.
Even though it would be a "breaking change", would it be too crazy to filter out the metrics logs by default? What are your thoughts on this @RafalSkolasinski ?
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.
Definitely something we could discuss but you're right on point - I wanted to avoid breaking changes
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 it would make sense to set it as the default on 1.3
. We can always make it very clear on the release notes.
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.
It would also make sense to tie it to debug
mode
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.
As in: if debug mode run verbose
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.
Cool, will make it default and will ping you when ready for re-review!
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.
@adriangonz made filtering default in production mode but disabled if SELDON_DEBUG
flag is set, tell me what you think :)
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.
BTW, tested all combinations
1ba5ef8
to
3afd6b1
Compare
Mon Sep 7 16:16:30 UTC 2020 impatient try |
Mon Sep 7 16:17:54 UTC 2020 impatient try |
/approve Change looks good! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriangonz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Wed Sep 9 09:01:55 UTC 2020 impatient try |
Wed Sep 9 09:01:59 UTC 2020 impatient try |
…cess logs
What this PR does / why we need it:
This allow to silence access logs to the metrics endpoint. Due to periodic and constant probing from Prometheus this obscures the log.
Which issue(s) this PR fixes:
Closes #1907
Special notes for your reviewer:
Does this PR introduce a user-facing change?: