Skip to content

eval: sum aggregation for gauges#1533

Merged
brharrington merged 1 commit intoNetflix:mainfrom
brharrington:eval-gauge-aggr
Mar 27, 2023
Merged

eval: sum aggregation for gauges#1533
brharrington merged 1 commit intoNetflix:mainfrom
brharrington:eval-gauge-aggr

Conversation

@brharrington
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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