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

chore(networkmonitor): add metric listing content topics + messages #1335

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

alrevuelta
Copy link
Contributor

@alrevuelta alrevuelta commented Nov 3, 2022

New feature for networkmonitor:

  • Subscribes to DefaultPubsubTopic and counts amount of messages rx in each content topic
  • Add a new endpoint to get the metrics on content topics and message count. http://127.0.0.1:8009/contenttopics
  • Stop storing content topics after the table reaches x size.

Notes:

  • In the future we may want to count a message rate, measured in msg per unit of time. A simple counter will overflow at some point.
  • Everything is in memory, which might be inviable depending on the number of content topics existing in the network. Note that there table has a limit. When exceeded, it removes the content topics with the least messages as protection.

Related #1010
Depends on #1290

@status-im-auto
Copy link
Collaborator

status-im-auto commented Nov 3, 2022

Jenkins Builds

Click to see older builds (8)
Commit #️⃣ Finished (UTC) Duration Platform Result
ea4da67 #1 2022-11-03 11:08:03 ~2 min macos 📄log
ea4da67 #1 2022-11-03 11:09:56 ~4 min linux 📄log
6606476 #2 2022-11-03 11:09:52 ~2 min macos 📄log
6606476 #2 2022-11-03 11:10:37 ~2 min linux 📄log
✔️ 6606476 #3 2022-11-10 09:51:49 ~21 min linux 📦bin
✔️ 6606476 #3 2022-11-10 09:52:01 ~22 min macos 📦bin
✔️ ed5b0b5 #4 2022-11-10 17:09:32 ~15 min linux 📦bin
✔️ ed5b0b5 #4 2022-11-10 17:09:51 ~15 min macos 📦bin
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ dd43aa4 #5 2022-11-11 09:03:03 ~16 min linux 📦bin
✔️ dd43aa4 #5 2022-11-11 09:04:56 ~18 min macos 📦bin
✔️ d23fa88 #6 2022-11-11 09:08:55 ~14 min linux 📦bin
✔️ d23fa88 #6 2022-11-11 09:48:25 ~54 min macos 📦bin

@alrevuelta alrevuelta force-pushed the network-monitoring-tool branch 3 times, most recently from dc6478b to 4de12f2 Compare November 7, 2022 15:48
@alrevuelta alrevuelta marked this pull request as draft November 8, 2022 07:17
@alrevuelta alrevuelta force-pushed the network-monitoring-tool branch 2 times, most recently from 27fcb37 to 725cd9f Compare November 10, 2022 07:16
Base automatically changed from network-monitoring-tool to master November 10, 2022 09:29
@alrevuelta alrevuelta marked this pull request as ready for review November 11, 2022 08:53
Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!


### metrics
Metrics are divided into two categories:
* Prometheus metrics, exposed as i.e. gauges.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Prometheus metrics, exposed as i.e. gauges.
* Prometheus metrics, exposed as e.g. gauges.

perhaps? :)

@alrevuelta alrevuelta merged commit cff8fb1 into master Nov 14, 2022
@alrevuelta alrevuelta deleted the monitor-topics branch November 14, 2022 07:33
This was referenced Nov 14, 2022
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

Successfully merging this pull request may close these issues.

3 participants