Skip to content
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

Collect Whisper metrics in MailServer #536

Closed
adambabik opened this issue Jan 5, 2018 · 6 comments
Closed

Collect Whisper metrics in MailServer #536

adambabik opened this issue Jan 5, 2018 · 6 comments
Assignees

Comments

@adambabik
Copy link
Contributor

adambabik commented Jan 5, 2018

Problem

We'd like to collect some Whisper metrics to assess Status usage. E.g. we'd like to see a consistent increase in the number of exchanged messages.

Implementation

Add metrics to wnode-status that runs as a MailServer. #523 has some initial work on gathering peers info that can be useful.

Acceptance Criteria

  1. The number of exchanged messages,
  2. The volume of cached messages.

Notes

Bear in mind that these metrics must be easy to visualize with Grafana.

It's part of status-im/swarms#68

@adambabik adambabik self-assigned this Jan 5, 2018
@xackery
Copy link

xackery commented Jan 9, 2018

Would prometheus be viable for metrics gathering?

@adambabik
Copy link
Contributor Author

I plan to write a simple abstraction or use https://github.com/go-kit/kit/tree/master/metrics in order to support multiple collectors.

One huge disadvantage of expvar is no labels support. We have a use case where we'd like to count messages by topic. With expvar it's only possible by using expvar.Map, however, additional logic to prune old topics is required.

Prometheus, on the other hand, has labels support built-in and provides much better integration with tools like Grafana.

Another thing to consider is server vs mobile node. It's ok to use Prometheus in the server node but it does not really make sense to use it in the mobile nodes. Thanks to the mentioned abstraction, we can select a proper tool depending on a use case.

@xackery
Copy link

xackery commented Jan 10, 2018

When you speak of abstraction, you mean you just plan to write an interface and wrap prometheus/other to implement it?

@xackery
Copy link

xackery commented Jan 10, 2018

Mainly just looking to do some PRs, this is one around my ballpark is why I shot the comment out. If it's claimed I'll lurk for another.

@adambabik
Copy link
Contributor Author

@xackery great to hear that! This issue is kind of in progress already but I have a different one that is related to metrics: #546. Would you be able to work on that one?

@chadyj chadyj mentioned this issue Jan 10, 2018
7 tasks
@adambabik
Copy link
Contributor Author

Done in #558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants