-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Log monitoring errors as warning and reduce verbosity #5287
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
expect(logger.error).to.have.been.calledWithMatch("Failed to send client stats", {}, error); | ||
function assertError(error: {message: string}): void { | ||
// errors are not thrown and need to be asserted based on the log | ||
expect(logger.warn).to.have.been.calledWithMatch("Failed to send client stats", {reason: error.message}); |
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.
The assertions here are a bit brittle due to checking the error messages, but should not break unless the log level is changed and having this stricter assertion is important to ensure we are actually testing correctly.
🎉 This PR is included in v1.7.0 🎉 |
Motivation
Similar to changes introduced in #5285, the monitoring service is just a sidecar to the main functionality/process and should be considered non-critical, meaning it should be fine here if we just log this as a warning.
Description
Log monitoring errors as
warn
instead oferror
and reduce verbosity (no stacktrace).The expected errors here are
The error message is enough to convey the issue, the stacktrace is not needed. Based on my observations using this for several weeks the errors I usually see are becasue of timeouts which are kinda expected since we send request 24/7 every minute and the remote service might be unresponsive sometimes.