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

Add booster-bitswap request and response count metrics to dashboard #838

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

kylehuntsman
Copy link
Contributor

@kylehuntsman kylehuntsman commented Sep 27, 2022

Setups the metrics infrastructure and adds metrics for booster-bitswap request and response counts for the RemoteBlockstore Get, Has, and GetSize functions to the monitoring Grafana dashboard. Adds counts for requests, and both success and fail responses. All counts show results over a 30 second interval.

Code Changes

  • Adds metrics webserver on booster-bitswap server Start to 0.0.0.0:1234
  • Adds prometheus scrape job to scrape booster-bitswap /metrics endpoint
  • Records request counts, success, and fail response counts for RemoteBlockstore Get, Has, and GetSize

Dashboard Changes

  • Adds request counts for RemoteBlockstore Get, Has, and GetSize
  • Adds response counts for RemoteBlockstore Get, Has, and GetSize
  • Adds an overall Bitswap Success / Failure rate that encompasses all Get, Has, and GetSize function requests and responses
  • Adds individual Success / Failure rate for each RemoteBlockstore Get, Has, and GetSize function

2022-09-27_01-38-30

@kylehuntsman kylehuntsman force-pushed the kylehuntsman/booster-bitswap-stats branch from 6b52968 to 66f45cd Compare October 6, 2022 08:00
@kylehuntsman kylehuntsman changed the base branch from nonsense/dagstore-tracing to main October 6, 2022 08:01
@kylehuntsman kylehuntsman marked this pull request as ready for review October 6, 2022 08:02
// Start the metrics web server
http.Handle("/metrics", metrics.Exporter("booster_bitswap")) // metrics server
go func() {
if err := http.ListenAndServe("0.0.0.0:1234", nil); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, apart from using 1234 -- this is lotus daemon port.

We should use a free port, and have it configurable.

@nonsense nonsense merged commit a240606 into main Oct 6, 2022
@nonsense nonsense deleted the kylehuntsman/booster-bitswap-stats branch October 17, 2022 09:56
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.

2 participants