-
Notifications
You must be signed in to change notification settings - Fork 24
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
enable individual labels from aggregate #269
Conversation
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.
LGTM
Maybe we can think about a follow-up, because it creates redundant information in metrics (there are individual labels AND concatenated labels) => maybe a bool flag, or an enum in Aggregation api to let the user choose how they want the result to look like? E.g. labelsMode: enum(copy|concat)
err, _, _ := aggregate.FilterEntry(entry) | ||
|
||
require.Equal(t, err, nil) |
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 would add a few more checks to test the new behavior.
Something like:
err, normalizedLabels, labels := aggregate.FilterEntry(entry)
require.Equal(t, err, nil)
require.Equal(t, Labels{"srcIP": "10.0.0.1", "dstIP": "20.0.0.2"}, labels)
require.Equal(t, NormalizedValues("20.0.0.2,10.0.0.1"), normalizedLabels)
Codecov Report
@@ Coverage Diff @@
## main #269 +/- ##
==========================================
+ Coverage 60.70% 66.88% +6.18%
==========================================
Files 73 73
Lines 4247 4149 -98
==========================================
+ Hits 2578 2775 +197
+ Misses 1502 1194 -308
- Partials 167 180 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Addresses #265
https://issues.redhat.com/browse/NETOBSERV-490