Skip to content
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

Implement regex for consumer_groups #14382

Merged
merged 4 commits into from
Apr 14, 2023

Conversation

yzhan289
Copy link
Contributor

@yzhan289 yzhan289 commented Apr 14, 2023

Remake of #14193

What does this PR do?

This PR adds a new config option called consumer_groups_regex. This functions similarly to consumer_groups to allow configuration of consumer groups, topics, and partitions to monitor, however this allows regex strings to be used.

This will be merged to master after #13918 is merged.

Motivation

Feature request

Additional Notes

When monitor_unlisted_consumer_groups is set to True, then both consumer_groups and consumer_groups_regex will be ignored.

When consumer_groups and consumer_groups_regex are both used, then consumer groups from both config options will be collected.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

@yzhan289 yzhan289 marked this pull request as ready for review April 14, 2023 17:31
@yzhan289 yzhan289 requested review from a team as code owners April 14, 2023 17:31
@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #14382 (7987b33) into master (a41ad12) will increase coverage by 0.08%.
The diff coverage is 97.53%.

Flag Coverage Δ
kafka_consumer 93.97% <97.53%> (+12.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@yzhan289 yzhan289 merged commit 2cbd09e into master Apr 14, 2023
@yzhan289 yzhan289 deleted the az/kafka-consumer-consumer-groups-regex branch April 14, 2023 17:50
Comment on lines +75 to +79
<CONSUMER_NAME_1>:
<TOPIC_NAME_1>: [0, 1, 4, 12]
<CONSUMER_NAME_2>:
<TOPIC_NAME_2>: []
<CONSUMER_NAME_3>: {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be helpful to provide some examples of proper regexes here - particularly to provide examples of keys like this in yaml (do they need to be wrapped in " or can you drop a raw regex as a key)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mwarkentin sorry just saw this. I've made a PR changing these examples to be more realistic: #14533

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yzhan289 !

@mwarkentin
Copy link

I was also wondering if you know when this will be released? Seems like datadog-agent is still on the 2.16.x series for the kafka consumer integration?

@yzhan289
Copy link
Contributor Author

yzhan289 commented May 8, 2023

I was also wondering if you know when this will be released? Seems like datadog-agent is still on the 2.16.x series for the kafka consumer integration?

The integration will be a part of Agent 7.45.0, which will be released in the upcoming few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants