-
Notifications
You must be signed in to change notification settings - Fork 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
Improved logging #480
Improved logging #480
Conversation
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.
Why the changes to .Maybe()
? Seems the mocked functions should still be called.
Some of these are tied to the removal of log changes (i.e. we don't always need to call This is all going to go away once we abandon (most) mocks in favour of test containers and "real" integration tests. |
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.
LGTM. I haven't read too much the specific of each log line, but we can polish that over time anyway.
My only concern is about the proposal of removal the debug logs, but I see a lot of info a warnings replacing the original debug logs, so I guess that is not reduce much our capacity of debugging things. Anyway I still hesitant of that specific point, but to be honest, I think it deserves a try. Let's add and remove debug log as they are needed during the initial phases of development of the future and keep cleaning then up short after. If we don't see ourself struggling with debugging, we can keep that approach. |
Summary
Take a sledgehammer to our current logging strategy in order to align around a simple set of ideas:
snake_case
, consistent parameters (e.g.user_id
andteams_user_id
anderror
)As part of this, I've gutted all testing of logs: we just accept anything during a test now. I've also fixed the spurious
mutex_cron_monitoring_system
failures that keep breaking the build.There are discrete commits if there's interest in reviewing as such. I've also pulled out a separate ticket to investigate high-volume "no results found" type of logs that aren't errors in most cases, but are hard to distinguish from real errors: https://mattermost.atlassian.net/browse/MM-56719.
Ticket Link
Fixes: https://mattermost.atlassian.net/browse/MM-55515
Fixes: https://mattermost.atlassian.net/browse/MM-55516
Fixes: https://mattermost.atlassian.net/browse/MM-55741