Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

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>
@javaducky javaducky requested a review from codebien August 12, 2022 09:45
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>
@pablochacin pablochacin requested a review from codebien August 18, 2022 11:33
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants