-
Notifications
You must be signed in to change notification settings - Fork 15
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
Merge exceptions instead of swapping #145
Conversation
if existing, exists := errorAggregates[item.AggregationKey]; exists { | ||
prevCount := targetErrorsCount[rp.Target][item.AggregationKey] | ||
errorAggregates[item.AggregationKey] = errorAggregate{ | ||
TotalCount: existing.TotalCount + (item.TotalCount - prevCount), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a possibility that his number would become negative and subtract instead of add to the total count?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some manually testing and it didn't happen. So not sure in which circumstances might happen.
Target
added toResponsePayload
, need to aggreggate errors per target.This PR solves #128