You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Express application using AsyncLocalStorage to create a request context and a Winston logger with context format. The format is just adding data like requestId from the async context to the log message.
Sometimes some of the logs don't have that requestId and it looks like this happens the most during peak load. As Winston is based on streams, is it possible that logs get buffered and flushed by some timer or OS callback, so format (next transform stream in the chain) could not find the right context anymore?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have an Express application using AsyncLocalStorage to create a request context and a Winston logger with context format. The format is just adding data like
requestId
from the async context to the log message.Sometimes some of the logs don't have that
requestId
and it looks like this happens the most during peak load. As Winston is based on streams, is it possible that logs get buffered and flushed by some timer or OS callback, so format (next transform stream in the chain) could not find the right context anymore?Beta Was this translation helpful? Give feedback.
All reactions