-
Notifications
You must be signed in to change notification settings - Fork 24
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
logging timestamps #1121
logging timestamps #1121
Conversation
d110943
to
c9e921c
Compare
c9e921c
to
4692ea6
Compare
4692ea6
to
00e102f
Compare
00e102f
to
71a6670
Compare
+2 |
There is a suspicion that our logs can lock from time to time. Currently the timestamp in our logs comes from the very end of log processing right before sending it to the writer thread which executes application callback. To check if we do not have any locking inside logging machinery on call site let's add two timestamps to our logs. One directly from the call site and second in formatter. Third is already there and comes from writter as explained above. This is a temporary commit meant to be reverted once we have results.
71a6670
to
2425858
Compare
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.
An idea: we can create a ticket about reverting this commit and link in TODO item in the code. This way we can leave it even for longer if needed with no worries about forgetting it(highly unlikeable though).
+1
Maybe this mutex is causing problem: https://github.com/search?q=repo%3ANordSecurity%2Flibtelio%20LAST_LOG_STATUS&type=code ? |
It might. It's the only lock I saw on the call site. But I would like to first confirm that what we saw was actually a lock in logging and not somewhere else. BTW since I think you're the implementor of the logging thread I have a question: Is there a reason why this filtering and censoring is done on the call site instead of inside the logging thread? |
No real reason. The offloading to separate thread was done due to slow I/O (via python) - I wasn't expecting (and didn't see any symptoms) the processing (which was already present for quite some time) to be an issue. So I think it perfectly valid offload it to logger thread. |
Add granular timestamps to logs
☑️ Definition of Done checklist