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

Use point in time values for gauge metrics in graphs #19690

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shtripat
Copy link
Contributor

@shtripat shtripat commented May 7, 2024

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

Motivation and Context

How to test this PR?

Load the dashboard in grafana

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

@shtripat shtripat requested a review from poornas May 7, 2024 17:11
@poornas
Copy link
Contributor

poornas commented May 7, 2024

@shtripat, grafana/grafana#78053 (comment) seems to indicate rate is incorrect to use for gauge as well - can you check?

@shtripat
Copy link
Contributor Author

shtripat commented May 7, 2024

@shtripat, grafana/grafana#78053 (comment) seems to indicate rate is incorrect to use for gauge as well - can you check?

Oh, sure. I will check and change accordingly.

@shtripat
Copy link
Contributor Author

shtripat commented May 8, 2024

@shtripat, grafana/grafana#78053 (comment) seems to indicate rate is incorrect to use for gauge as well - can you check?

Oh, sure. I will check and change accordingly.

Based on this looks like we should rather render the graphs using metrics as is without ratifying it. The graph can simple show the values over time.
I am not too sure if its hard rule to not use rate as well for gauge metrics. increase makes sense not to use as gauge metrics can go in -ve as well and increase is meant more for calculating the increase rate.

@shtripat
Copy link
Contributor Author

shtripat commented May 8, 2024

Some more reading shows findings like

While we can use the rate() function with gauge metrics, it's essential to interpret the results appropriately. Since gauges represent instantaneous values, the rate of change calculated by the rate() function may fluctuate significantly depending on the frequency of scrapes and variations in the underlying metric values. Therefore, it's crucial to consider the context and understand the behavior of the gauge metric when using the rate() function with it in Grafana queries.

based on this, simpler it would be to just graph the metrics values as is which shows point in time values for the metrics.
@poornas suggestions?

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
@shtripat shtripat changed the title Use rate aggregate function for gauge metrics Use point in time values for gauge metrics in graphs May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants