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

Send trend sum as metric #34

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Send trend sum as metric #34

merged 2 commits into from
Aug 18, 2022

Conversation

pablochacin
Copy link
Contributor

Send the sum of values of a Trend metric to prometheus to allow the calculation of moving averages:

  rate(http_request_duration_seconds_sum[2m]) / rate(http_request_duration_seconds_count[2m])

Signed-off-by: Pablo Chacin pablochacin@gmail.com

Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
Copy link
Contributor

@codebien codebien left a comment

Choose a reason for hiding this comment

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

LGTM, it would be good to add a test for the MapTrend method. It would be good to add it directly here. @pablochacin Would you be interested in adding it?

@pablochacin
Copy link
Contributor Author

Yes, I will take a look at it @codebien

Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
Copy link
Contributor

@codebien codebien left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @pablochacin 🙇

@codebien codebien merged commit 6d82624 into grafana:main Aug 18, 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.

None yet

2 participants