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

fix(apiserver-duration): compute average of duration #63

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

clementnuss
Copy link
Contributor

without the fix, the dashboards show the cumulative duration of all buckets, which doesn't make much sense. (we plot sum by (instance) of buckets, and there are ~10 buckets (le="0.05", le="0.1", ..., le="+Inf"). this doesn't represent the latency of the API server.
with the fix, we divide the total duration by the number of requests, which yields the average latency. note that we could also have used _duration_seconds_bucket{le="+Inf"} instead of duration_seconds_sum

Pull Request

Required Fields

🔎 What kind of change is it?

  • fix

🎯 What has been changed and why do we need it?

before:
image

after:
image

without the fix, the dashboards show the cumulative duration
of all buckets, which doesn't make much sense.
with the fix, we divide the total duration by the number of requests,
which yields the average latency. note that we could also have used
`_duration_seconds_bucket{le="+Inf"}` instead of `duration_seconds_sum`

Signed-off-by: Clément Nussbaumer <[email protected]>
@dotdc dotdc merged commit 6949d30 into dotdc:master Sep 14, 2023
1 check passed
@dotdc
Copy link
Owner

dotdc commented Sep 14, 2023

Hi @clementnuss,

Sorry I didn't have time to test this but sounds good, so I'll merge as is.
Will tag you if I notice anything on these panels later 👍

Thank you for your contribution!

@dotdc
Copy link
Owner

dotdc commented Apr 25, 2024

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dotdc dotdc added the released label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants