-
Notifications
You must be signed in to change notification settings - Fork 15
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
Downgrade various logs to DEBUG
level
#2557
Conversation
The Trillium handler for errors was unconditionally logging them at `WARN`, generating large volumes of logging for problems that aren't Janus' fault, like reports whose timestamps are in the future. Now, we check whether the respones indicates a server error before bothing to log it (keeping in mind that client errors will still appear in metrics). Additionally, we've made liberal use of the [`tracing::instrument`][1] attribute macro to decorate various functions and methods with tracing spans, and in particular its `err` argument for logging anytime a function that returns `Result<T, E>` returns an `Err`. Mostly, logging those errors is handled at a higher level -- say, in a Trillium handler or in the top-level loop of `aggregation_job_driver` -- so logging them at level `ERROR` at the function call itself isn't that helpful. This commit further qualifies the `err` argument so that those errors are now logged at `DEBUG`, so we can opt back into them should they prove useful. [1]: https://docs.rs/tracing/latest/tracing/attr.instrument.html
This will need backport to |
I think this will partially, if not wholly, address #2462. |
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's unfortunate to lose datastore logging because I think it does reveal some interesting information for troubleshooting, but I think it means we should be more aggressive about turning up the log level at runtime when we need to debug.
The Trillium handler for errors was unconditionally logging them at `WARN`, generating large volumes of logging for problems that aren't Janus' fault, like reports whose timestamps are in the future. Now, we check whether the respones indicates a server error before bothing to log it (keeping in mind that client errors will still appear in metrics). Additionally, we've made liberal use of the [`tracing::instrument`][1] attribute macro to decorate various functions and methods with tracing spans, and in particular its `err` argument for logging anytime a function that returns `Result<T, E>` returns an `Err`. Mostly, logging those errors is handled at a higher level -- say, in a Trillium handler or in the top-level loop of `aggregation_job_driver` -- so logging them at level `ERROR` at the function call itself isn't that helpful. This commit further qualifies the `err` argument so that those errors are now logged at `DEBUG`, so we can opt back into them should they prove useful. [1]: https://docs.rs/tracing/latest/tracing/attr.instrument.html
The Trillium handler for errors was unconditionally logging them at
WARN
, generating large volumes of logging for problems that aren't Janus' fault, like reports whose timestamps are in the future. Now, we check whether the respones indicates a server error before bothing to log it (keeping in mind that client errors will still appear in metrics).Additionally, we've made liberal use of the
tracing::instrument
attribute macro to decorate various functions and methods with tracing spans, and in particular itserr
argument for logging anytime a function that returnsResult<T, E>
returns anErr
. Mostly, logging those errors is handled at a higher level -- say, in a Trillium handler or in the top-level loop ofaggregation_job_driver
-- so logging them at levelERROR
at the function call itself isn't that helpful. This commit further qualifies theerr
argument so that those errors are now logged atDEBUG
, so we can opt back into them should they prove useful.