eval: sum aggregation for gauges#1533
Merged
brharrington merged 1 commit intoNetflix:mainfrom Mar 27, 2023
Merged
Conversation
Adds a new datapoint aggregator implementation to handle sum/count of gauge values that come from an aggregation service where there can be duplicates. The aggregation service would add a tag `atlas.aggr` with a key to use for grouping and deduping the relevant values. Values within a group will use max aggregation to be consistent with the behavior if there was a single instance of the aggregation service.
manolama
reviewed
Mar 27, 2023
| def datapoint: AggrDatapoint = { | ||
| val tags = init.tags - aggrTagKey | ||
| var sum = 0.0 | ||
| maxValues.foreach { (_, v) => sum = op(sum, v) } |
Contributor
There was a problem hiding this comment.
I assume NaNs are filtered out before this point.
Contributor
Author
There was a problem hiding this comment.
There shouldn't be NaN values here, though note the op in this case is addNaN so it can handle them in the expected way.
manolama
approved these changes
Mar 27, 2023
brharrington
added a commit
to brharrington/atlas
that referenced
this pull request
Apr 3, 2023
Adds a new datapoint aggregator implementation to handle sum/count of gauge values that come from an aggregation service where there can be duplicates. The aggregation service would add a tag `atlas.aggr` with a key to use for grouping and deduping the relevant values. Values within a group will use max aggregation to be consistent with the behavior if there was a single instance of the aggregation service.
brharrington
added a commit
that referenced
this pull request
Apr 3, 2023
Adds a new datapoint aggregator implementation to handle sum/count of gauge values that come from an aggregation service where there can be duplicates. The aggregation service would add a tag `atlas.aggr` with a key to use for grouping and deduping the relevant values. Values within a group will use max aggregation to be consistent with the behavior if there was a single instance of the aggregation service. Backport of #1533.
manolama
pushed a commit
to manolama/atlas
that referenced
this pull request
May 22, 2024
Adds a new datapoint aggregator implementation to handle sum/count of gauge values that come from an aggregation service where there can be duplicates. The aggregation service would add a tag `atlas.aggr` with a key to use for grouping and deduping the relevant values. Values within a group will use max aggregation to be consistent with the behavior if there was a single instance of the aggregation service.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new datapoint aggregator implementation to handle sum/count of gauge values that come from an aggregation service where there can be duplicates. The aggregation service would add a tag
atlas.aggrwith a key to use for grouping and deduping the relevant values. Values within a group will use max aggregation to be consistent with the behavior if there was a single instance of the aggregation service.