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

Add flag monitor_all_broker_highwatermarks, refactor #4385

Merged
merged 1 commit into from
Aug 17, 2019
Merged

Add flag monitor_all_broker_highwatermarks, refactor #4385

merged 1 commit into from
Aug 17, 2019

Conversation

jeffwidman
Copy link
Contributor

@jeffwidman jeffwidman commented Aug 16, 2019

What does this PR do?

A large refactor, most in preparation for the new version of the check.

  1. Stop pointlessly passing groups/topics around. This is much cleaner
    handled at the object level no point in passing most of this around.
  2. Add a flag monitor_all_broker_highwatermarks that allows fetching
    broker offsets for topics that are not part of a consumer's
    subscription.
  3. Cleanup the tests slightly as one test was shoehorned onto another
    test and the shared state was causing some weird breakage.
  4. Streamline the overall code flow so that its more readable.
  5. Change the way the context limit is enforced so that it's applied to
    the sum total, rather than piecemeal. Additionally, because it's applied
    to the total rather than the pieces, after discussion with @ofek I
    bumped the context limit to 500. This should be a reasonable default to
    prevent abuse while still handling most cases.
  6. Change so that internal topics like __consumer_offsets are never
    excluded from the broker highwater mark fetch. It's generally pointless
    to fetch these as users care about the contents of the messages in that
    topic, not the broker offsets of that particular topic.

@jeffwidman jeffwidman requested a review from a team as a code owner August 16, 2019 05:28
@jeffwidman jeffwidman requested a review from a team as a code owner August 17, 2019 03:47
@ofek ofek changed the title Stop pointlessly passing consumer groups and topics around Add flag monitor_all_broker_highwatermarks, refactor Aug 17, 2019
ofek
ofek previously approved these changes Aug 17, 2019
A large refactor, most in preparation for the new version of the check.

1. Stop pointlessly passing groups/topics around. This is much cleaner
handled at the object level no point in passing most of this around.
2. Add a flag `monitor_all_broker_highwatermarks` that allows fetching
broker offsets for topics that are not part of a consumer's
subscription.
3. Cleanup the tests slightly as one test was shoehorned onto another
test and the shared state was causing some weird breakage.
4. Streamline the overall code flow so that its more readable.
5. Change the way the context limit is enforced so that it's applied to
the sum total, rather than piecemeal. Additionally, because it's applied
to the total rather than the pieces, after discussion with @ofek I
bumped the context limit to 500. This should be a reasonable default to
prevent abuse while still handling most cases.
6. Change so that internal topics like `__consumer_offsets` are never
excluded from the broker highwater mark fetch. It's generally pointless
to fetch these as users care about the contents of the messages in that
topic, not the broker offsets of that particular topic.
@ofek ofek merged commit c4a29b1 into DataDog:master Aug 17, 2019
@jeffwidman jeffwidman deleted the stop-pointlessly-passing-consumer-groups-and-topics-around branch August 17, 2019 05:22
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.

2 participants