Skip to content

[chore] internal/kafka: introduce configkafka package #38482

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

Merged
merged 11 commits into from
Mar 12, 2025

Conversation

axw
Copy link
Contributor

@axw axw commented Mar 9, 2025

Description

This is the first part of #38411, creating a package with common configuration structs for Kafka-related components.

The new types have stronger validation, and all validation is done in one place rather than in each component. I have therefore removed some tests from the components related to validating authentication config, and ensured coverage within internal/kafka.

The configkafka package is complete, but to keep the PR contained I've only updated the components to use the new AuthenticationConfig type for now. In future PRs I will:

  • update the components to embed ClientConfig, ConsumerConfig, and ProducerConfig where appropriate
  • introduce functions in the internal/kafka package for creating Sarama clients based on configkafka types
  • unify the defaults across the components

Link to tracking issue

First part of #38411

Testing

Added unit tests.

Documentation

N/A, no user-facing changes yet.

@axw axw force-pushed the internal-kafka-configkafka branch from 9c2de0c to e5501e1 Compare March 9, 2025 07:42
@axw axw marked this pull request as ready for review March 9, 2025 23:46
@axw axw requested a review from a team as a code owner March 9, 2025 23:46
@MovieStoreGuy
Copy link
Contributor

Looks like you'll need to run:

make genotelcontribcol
./.github/workflows/scripts/check-collector-module-version.sh

@MovieStoreGuy MovieStoreGuy merged commit 88616ca into open-telemetry:main Mar 12, 2025
171 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 12, 2025
@axw axw deleted the internal-kafka-configkafka branch March 13, 2025 00:09
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.

3 participants