-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/kafka] Add ability to specifiy Kafka Client ID #30145
[exporter/kafka] Add ability to specifiy Kafka Client ID #30145
Conversation
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.
It would be good to add some tests to ensure the config option is picked up properly, and if possible, exported with the proper client ID.
@crobert-1 good call, it was broken haha. Sorry my first time contributing to this codebase. I've added tests that the YAML is parsed properly. I'm not sure how to do any further validation though cause the |
Ok I also figured out how to compile the program from scratch and I tested it with a custom yaml configuration file and I was able to confirm that the default of |
Minor request: Can you change the above line in your description to:
This will allow our GitHub CI/CD automation to automatically close the referenced issue 👍 |
Done! |
@open-telemetry/collector-maintainers could you help final review and merge this pr? |
Seems good to me :) Resolved #30144 |
…try#30145) **Description:** This P.R adds the ability to specify the Kafka client ID in the Sarama Kafka producer when constructing the client. **Link to tracking Issue:** Resolves 30144 **Testing:** I didn't add any tests because its just propagating a configuration value, and the Sarama client (including its mock) does not expose any mechanism for asserting on which client ID was propagated with each produce request because it happens at the TCP protocol level and is not part of the application level payload. https://github.com/IBM/sarama/blob/main/mocks/mocks.go#L40 **Documentation:** I've updated the documentation and change log to document this feature.
Description: This P.R adds the ability to specify the Kafka client ID in the Sarama Kafka producer when constructing the client.
Link to tracking Issue: Resolves 30144
Testing: I didn't add any tests because its just propagating a configuration value, and the Sarama client (including its mock) does not expose any mechanism for asserting on which client ID was propagated with each produce request because it happens at the TCP protocol level and is not part of the application level payload.
https://github.com/IBM/sarama/blob/main/mocks/mocks.go#L40
Documentation: I've updated the documentation and change log to document this feature.