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

eval: sum aggregation for gauges #1533

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

brharrington
Copy link
Contributor

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.

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 brharrington added this to the 1.8.0 milestone Mar 27, 2023
@brharrington brharrington requested a review from manolama March 27, 2023 03:28
def datapoint: AggrDatapoint = {
val tags = init.tags - aggrTagKey
var sum = 0.0
maxValues.foreach { (_, v) => sum = op(sum, v) }
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume NaNs are filtered out before this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@brharrington brharrington merged commit 9cb9ccd into Netflix:main Mar 27, 2023
@brharrington brharrington deleted the eval-gauge-aggr branch March 27, 2023 17:48
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.
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