-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(eventbus): warn applications whenever events aren't read #2026
Conversation
Adds logging for the EventBus, Mainly a periodical warning for applications whenever they are slow in reading or do not read EventBus notifications. It came up after debugging a very tricky case where a bugged Server side application wasn't reading `EvtConnectednessChanged` events, which manifested in the server's inability to accept new streams as connection handling logic deadlocked on _sync_ Notifee's `Connected` callbacks which emit the events. P.S. This change should save some time for future application developers.
da366f1
to
e974590
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.
Please don't introduce a timer here. Emitting multiple log entries because you might miss a single entry doesn't sound very convincing to me. This will just spam the log.
|
Starting a timer to emit a log message seems very heavy. If that’s needed due to burstiness, I’m beginning to wonder if this is the right approach at all. Maybe building proper monitoring would be the better way? I’m strongly opposed to spamming the logs. Just because a log entry is important is no justification for repeating it 10 times (per second!).
That case is quite the opposite. These are all separate events, and we sample them to dial down the log frequency. If at all, this is an argument why we should not spam the log. |
i think we can have a retry of 3 times without a timer @marten-seemann what do u think ? |
There's no point in retrying if you don't wait in between. |
can we wait with a sleep not with a timer ? |
@Wondertan Can you have a look at the dashboard we're adding in #2038. There are two dashboards that should have helped you detect the bug: |
Closing since this has been addressed by adding metrics. |
Adds logging for the EventBus, Mainly a periodical warning for applications whenever they are slow in reading or do not read EventBus notifications. It came up after debugging a very tricky case where a bugged Server side application wasn't reading
EvtConnectednessChanged
events, which manifested in the server's inability to accept new streams as connection handling logic deadlocked on sync Notifee'sConnected
callbacks which emit the events.P.S. This change should save some time for future application developers.