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

[receiver/zookeeper] Add support for ruok command #22726

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

akats7
Copy link
Contributor

@akats7 akats7 commented May 24, 2023

Description:
Add zookeeper ruok health check metric based on response from ruok 4lw command
NOTE: preliminary PR not ready to be merged

Link to tracking Issue: resolves #21481

Testing:: Modified existing unit tests to account for additional metric from additional command. Made minor change to test structure to account for separate text responses from separate commands. Added unit test to handle following cases, valid "imok" return from server, invalid response from server, and empty response from server.

@akats7 akats7 requested a review from a team May 24, 2023 04:36
@akats7 akats7 requested a review from djaglowski as a code owner May 24, 2023 04:36
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 24, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

I think with the addition of another connection/call, this scraper's separation of concerns is a bit difficult to follow. Specifically, the way we manage connections and make requests is very mixed together with the way we process responses.

I've opened #22752 to split these concerns apart. Sorry to jump in front of your PR like this but I'll be a lot more confident in the change if you're willing to rebase onto that and follow the pattern there (or let me know why it doesn't work).

receiver/zookeeperreceiver/scraper.go Outdated Show resolved Hide resolved
@djaglowski djaglowski changed the title Combined scraper [receiver/zookeeper] Add support for ruok command May 24, 2023
@akats7
Copy link
Contributor Author

akats7 commented May 24, 2023

I think with the addition of another connection/call, this scraper's separation of concerns is a bit difficult to follow. Specifically, the way we manage connections and make requests is very mixed together with the way we process responses.

I've opened #22752 to split these concerns apart. Sorry to jump in front of your PR like this but I'll be a lot more confident in the change if you're willing to rebase onto that and follow the pattern there (or let me know why it doesn't work).

Hey @djaglowski, yep that makes perfect sense to me. That does make it a lot cleaner.

@djaglowski
Copy link
Member

@akats, #22752 was finally merged.

@akats7
Copy link
Contributor Author

akats7 commented Jun 5, 2023

@akats, #22752 was finally merged.

@djaglowski Great thanks, I will push up an update

@akats7
Copy link
Contributor Author

akats7 commented Jun 18, 2023

Hey @djaglowski, apologies for the delay, I pushed up an update with the changes

@djaglowski
Copy link
Member

Thanks @akats7. CI is running now. Otherwise, looks good, just a couple minor things.

@djaglowski djaglowski added the ready to merge Code review completed; ready to merge by maintainers label Jun 21, 2023
@djaglowski djaglowski merged commit 40647ad into open-telemetry:main Jun 21, 2023
@djaglowski
Copy link
Member

Thank you @akats7!

@github-actions github-actions bot added this to the next release milestone Jun 21, 2023
fchikwekwe pushed a commit to fchikwekwe/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2023
**Description:** <Describe what has changed.>
Add zookeeper ruok health check metric based on response from ruok 4lw
command
**NOTE**: preliminary PR not ready to be merged

**Link to tracking Issue:** resolves open-telemetry#21481 

**Testing:**: Modified existing unit tests to account for additional
metric from additional command. Made minor change to test structure to
account for separate text responses from separate commands. Added unit
test to handle following cases, valid "imok" return from server, invalid
response from server, and empty response from server.
Caleb-Hurshman pushed a commit to observIQ/opentelemetry-collector-contrib that referenced this pull request Jul 6, 2023
**Description:** <Describe what has changed.>
Add zookeeper ruok health check metric based on response from ruok 4lw
command
**NOTE**: preliminary PR not ready to be merged

**Link to tracking Issue:** resolves open-telemetry#21481 

**Testing:**: Modified existing unit tests to account for additional
metric from additional command. Made minor change to test structure to
account for separate text responses from separate commands. Added unit
test to handle following cases, valid "imok" return from server, invalid
response from server, and empty response from server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers receiver/zookeeper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ruok command in zookeeper receiver
3 participants