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: always use sum aggregator for sum & count #1

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

raghuram-periaswamy
Copy link

sum & count metrics of summary & histogram should always be summed irrespective of the custom aggregator that's mentioned as part of the metric definition.

Previously, aggregating the following two sample sets

set-1

http_duration_seconds{quantile="0.95"} 4
http_duration_seconds_sum 10
http_duration_seconds_count 5

set-2

http_duration_seconds{quantile="0.95"} 6
http_duration_seconds_sum 20
http_duration_seconds_count 5

using average yields the following where every metric is averaged.

http_duration_seconds{quantile="0.95"} 5
http_duration_seconds_sum 15
http_duration_seconds_count 5

The fix will always perform sum for the sum & count yielding,

http_duration_seconds{quantile="0.95"} 5
http_duration_seconds_sum 30
http_duration_seconds_count 10

sum & count metrics of summary & histogram should always be summed irrespective of the custom aggregator
@raghuram-periaswamy raghuram-periaswamy merged commit 4ef34bc into master Mar 1, 2021
@raghuram-periaswamy raghuram-periaswamy deleted the aggregation-fix branch March 1, 2021 09:07
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.

2 participants