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

Replace block wait metric with Histogram #424

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Replace block wait metric with Histogram #424

merged 1 commit into from
Nov 21, 2023

Conversation

darunrs
Copy link
Collaborator

@darunrs darunrs commented Nov 21, 2023

Current block wait metric uses a gauge, which is causing spikes in block wait to be lost. So, I have switched it to a histogram instead, which does a much better job at capturing peaks and having a variety of more useful expressions, some of which I list below. These expressions are also customizable.

A more accurate average:
rate(queryapi_runner_block_wait_duration_milliseconds_sum[$__rate_interval]) / rate(queryapi_runner_block_wait_duration_milliseconds_count[$__rate_interval])

The duration under which 95% of block requests were fulfilled
histogram_quantile(0.95, sum(rate(queryapi_runner_block_wait_duration_milliseconds_bucket[$__rate_interval])) by (le))

The % of requests for each indexer where the block wait was under 100ms

  sum(rate(queryapi_runner_block_wait_duration_milliseconds_bucket{le="100"}[$__rate_interval])) by (indexer)
/
  sum(rate(queryapi_runner_block_wait_duration_milliseconds_count[$__rate_interval])) by (indexer)

@morgsmccauley
Copy link
Collaborator

Oh, is this still draft?

@darunrs darunrs marked this pull request as ready for review November 21, 2023 19:56
@darunrs darunrs requested a review from a team as a code owner November 21, 2023 19:56
@darunrs
Copy link
Collaborator Author

darunrs commented Nov 21, 2023

I started it as a draft and then switched it to ready haha.

@darunrs darunrs merged commit c028f92 into main Nov 21, 2023
5 checks passed
@darunrs darunrs deleted the capturePeaks branch November 21, 2023 20:02
@darunrs darunrs linked an issue Nov 21, 2023 that may be closed by this pull request
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.

Capture Peaks in Block Wait Time
2 participants