-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix errors related to filtering based on user-specified consumer groups filters #14406
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
ghost
added
the
integration/kafka_consumer
label
Apr 18, 2023
Since it's a configuration concern, that's where it seems to belong, and the behavior would thus be consistent with where other `ConfigurationError`s are raised.
ghost
added
base_package
dependencies
documentation
integration/gitlab
integration/mysql
labels
Apr 18, 2023
alopezz
added
changelog/Fixed
category/bugfix
For use during Agent Release period
labels
Apr 18, 2023
alopezz
force-pushed
the
alopez/kafka-consumer/config-cleanup
branch
from
April 18, 2023 14:36
bee3bee
to
6e307dd
Compare
alopezz
force-pushed
the
alopez/kafka-consumer/consumer-groups-fix
branch
from
April 18, 2023 14:37
ccc5f34
to
0c67ed6
Compare
iliakur
reviewed
Apr 18, 2023
Co-authored-by: Ilia Kurenkov <ilia.kurenkov@datadoghq.com>
yzhan289
approved these changes
Apr 19, 2023
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! Good note about reading commit by commit, definitely helped with understanding. Just 1 non-blocking question.
steveny91
pushed a commit
that referenced
this pull request
Apr 21, 2023
…ps filters (#14406) * Add extra test case * Move consumer group validation to config class * Move validation of correct consumer group configuration to Config class Since it's a configuration concern, that's where it seems to belong, and the behavior would thus be consistent with where other `ConfigurationError`s are raised. * Make sure we don't return metrics for consumer groups that don't exist * Separate partition filtering step * Separate filtering based on `consumer_groups` to its own function * Use consistent logic for all the types of filtering * Separate all filtering to a separate method * Fix early skip when filtering by regexes * Change looping order to simplify and avoid unnecessary work * Simplify filtering functions * Deduplicate filtered partitions and remove unnecessary option checking * Rename exact match filtering function to better reflect what it does * Fix wording on test id Co-authored-by: Ilia Kurenkov <ilia.kurenkov@datadoghq.com> --------- Co-authored-by: Ilia Kurenkov <ilia.kurenkov@datadoghq.com> Co-authored-by: Andrew Zhang <andrew.zhang@datadoghq.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It fixes a few errors and cleans up the logic involved in filtering of partitions based on the filters specified in the config.
Motivation
QA (AI-3024).
The main problems found were:
consumer_groups
didn’t really match any actual consumer groups, which is an unnecessary and unintuitive change in behaviour when compared to previous versions of the integration.consumer_groups_regex
failed to match against a given consumer group, it would skip trying to match the rest of the regexes in that config option for that consumer group.consumer_groups
-based filtering options was inconsistent, even when it didn't result in externally visible behaviour (due to deduplication of metrics in the agent), there could be maintainability and performance concerns.Additional Notes
Reviewers are advised to look at this PR one commit at a time to follow the individual steps more easily.
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attachedqa/skip-qa
label.