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

Fix issue#409: skip error group members #441

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

showuon
Copy link
Contributor

@showuon showuon commented May 15, 2024

Fix #409

GroupDescription structure there are Err/ErrorCode fields, that are not checked by the exporter for errors in the Kafka response. Therefore, the exporter always believes, that the answer is correct, which sometimes leads to collisions in the metric.

This PR fixes it by checking the error code and log error for code not equal to 0.

The log when describe some groups with error is like this:

E0515 15:26:48.895819   37293 kafka_exporter.go:573] Cannot describe for the group console-consumer-57947 with error code 16

@showuon
Copy link
Contributor Author

showuon commented May 17, 2024

@danielqsj , could you help take a look? Thanks.

@showuon
Copy link
Contributor Author

showuon commented May 24, 2024

@danielqsj , gently ping for review. Thanks.

@danielqsj
Copy link
Owner

/lgtm thanks @showuon

@danielqsj danielqsj merged commit fb7cf1a into danielqsj:master May 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to get any kafka_consumergroup metrics from Kafka exporter
2 participants