-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[chore] kafkareceiver: embed configkafka types #38817
Conversation
Use configkafka.ClientConfig and configkafka.ConsumerConfig, and the newly extracted consumer client. This is a non-functional change, as the config defaults do not change for this component. Relates to open-telemetry#38411
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.
LGTM
@@ -4,17 +4,8 @@ kafka: | |||
- "foo:123" | |||
- "bar:456" | |||
resolve_canonical_bootstrap_servers_only: true | |||
client_id: otel-collector |
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.
could we keep this to make sure the API does not change?
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.
Do you mean auth and metadata? I removed them because we have coverage for the ClientConfig type in the internal/kafka/configkafka package. We're still verifying client_id and group_id below, as a minimal subset of the CientConfig and ConsumerConfig types - to verify that we're embedding them correctly.
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.
Yeah, it would be great to know which API you mean here @pavolloffay
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.
These changes look great to me and really simplifies the components and maintaining them.
Description
Use configkafka.ClientConfig and configkafka.ConsumerConfig, and the newly extracted consumer client. Redundant validation tests have been removed, as they are now covered by configkafka.
This is a non-functional change, as the config defaults do not change for this component. Nevertheless I have manually tested -- see Testing section below.
Link to tracking issue
Fixes #38411
Testing
Updated unit tests.
Manually tested against Redpanda:
$ docker run --publish=9093:9093 --health-cmd "rpk cluster health | grep 'Healthy:.*true'" docker.redpanda.com/redpandadata/redpanda:v23.1.11 redpanda start --kafka-addr=internal://0.0.0.0:9092,external://0.0.0.0:9093 --smp=1 --memory=1G --mode=dev-container
Ran the collector with
kafkametrics -> kafkaexporter -> Redpanda -> kafkareceiver -> debugexporter
:Documentation
Updated README to clarify that
protocol_version
is not required.