-
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
eventbus: expose metrics #2020
Comments
Since an emitter is already associated with a type we would not need reflection. Something like this would do, right?
This is the approach taken in PR: #2038
By subscribers were notified, do you mean that the message was successfully pushed on to the channel and the Emit method returned?
This can either be done by
or
For both the methods for useful monitoring we'd need to add a name to the subscription so that we can know which subscription is lagging. |
Yes exactly. This would help detect if one of the consumers (the subscriber) is too slow consuming events.
Agreed, we should add the name here. I'd definitely prefer 2. |
I added another useful metric to the list above. @sukunrt, what do you think? Happy to hear your thoughts on these. Also feel free to suggest other metrics that might be interesting :) |
number of subscribers is nice! |
Smart idea! I'd like to avoid hard-coding that though. Maybe we can track the channel length instead? The only caveat is that we can only do when we're actually emitting an event. |
I updated the PR: this wait time thing isn't working as I'd have liked, we can remove it but leaving it there for you to check it once. I also added measuring events emitted by subscriber. |
This is very limited in scope, but might be a very useful indicator that things are going wrong. We should track:
The text was updated successfully, but these errors were encountered: