-
Notifications
You must be signed in to change notification settings - Fork 4
Collect metrics for a set of CG states #7
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
Conversation
minion/consumer_group_offsets.go
Outdated
| if len(s.Cfg.ConsumerGroups.ConsumerGroupStates) == 0 { | ||
| groupIDs[i] = group.Group | ||
| } else { | ||
| for _, state := range s.Cfg.ConsumerGroups.ConsumerGroupStates { |
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.
instead of iterating through all states can we keep these states in a map and do a O(1) lookup here?
amuraru
left a comment
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.
see minor review comments
Co-authored-by: Adrian Muraru <[email protected]>
minion/consumer_group_offsets.go
Outdated
| // create a map for faster lookup | ||
| groupStatesMap := make(map[string]string, len(s.Cfg.ConsumerGroups.AllowedConsumerGroupStates)) | ||
| for _, state := range s.Cfg.ConsumerGroups.AllowedConsumerGroupStates { | ||
| groupStatesMap[state] = state | ||
| } |
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.
move this to minion/config_consumer_group.go
06bc6e9 to
11eedc3
Compare
* Filter empty consumer groups * Collect metrics for a set of CG states * Update minion/config_consumer_group.go Co-authored-by: Adrian Muraru <[email protected]> * Implement review * Implement review * Update the CG state values --------- Co-authored-by: Adrian Muraru <[email protected]>
* Filter empty consumer groups * Collect metrics for a set of CG states * Update minion/config_consumer_group.go Co-authored-by: Adrian Muraru <[email protected]> * Implement review * Implement review * Update the CG state values --------- Co-authored-by: Adrian Muraru <[email protected]>
* Filter empty consumer groups * Collect metrics for a set of CG states * Update minion/config_consumer_group.go Co-authored-by: Adrian Muraru <[email protected]> * Implement review * Implement review * Update the CG state values --------- Co-authored-by: Adrian Muraru <[email protected]>
Description
Add the flexibility to collect metrics for CG that are in specific states. This allows for less metrics when users create CGs each time the application starts.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: