Skip to content

[exporter/kafka] Add support for allow_auto_topic_creation to keep partity between Sarama and Franz-Go#42507

Merged
atoulme merged 2 commits into
open-telemetry:mainfrom
paulojmdias:feat/42468_1
Sep 6, 2025
Merged

[exporter/kafka] Add support for allow_auto_topic_creation to keep partity between Sarama and Franz-Go#42507
atoulme merged 2 commits into
open-telemetry:mainfrom
paulojmdias:feat/42468_1

Conversation

@paulojmdias
Copy link
Copy Markdown
Member

Description

Add support for configuring Kafka topic auto-creation in the exporter by introducing the allow_auto_topic_creation option for producers.

Franz-go and Sarama differ in their defaults for topic auto-creation. Sarama enables it by default, while Franz-go requires explicit configuration. This PR aligns behavior across both clients and gives users explicit control to avoid unexpected broker errors when topics are not pre-created.

Link to tracking issue

Fixes #42468

Testing

I tested the option using both Sarama and Franz-Go with both values (true and false) and the behaviour is the expected.

…rtity between Sarama and Franz-Go

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Copy link
Copy Markdown
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@axw axw added the ready to merge Code review completed; ready to merge by maintainers label Sep 5, 2025
@paulojmdias
Copy link
Copy Markdown
Member Author

/easycla

@atoulme atoulme merged commit 1960c8c into open-telemetry:main Sep 6, 2025
201 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 6, 2025
@paulojmdias paulojmdias deleted the feat/42468_1 branch September 6, 2025 07:34
songy23 pushed a commit that referenced this pull request Oct 10, 2025
#### Description

I would like to propose adding @paulojmdias as a code owner of the Kafka
components. He has been doing excellent work across all of those
components (and more besides!).

-
#42507
-
#42796
-
#43105
-
#42181
-
#42327
-
#42507
-
#42796
-
#43019
-
#43083
-
#43105

#### Link to tracking issue

N/A

#### Testing

N/A

#### Documentation

N/A
ChrsMark pushed a commit to ChrsMark/opentelemetry-collector-contrib that referenced this pull request Oct 20, 2025
#### Description

I would like to propose adding @paulojmdias as a code owner of the Kafka
components. He has been doing excellent work across all of those
components (and more besides!).

-
open-telemetry#42507
-
open-telemetry#42796
-
open-telemetry#43105
-
open-telemetry#42181
-
open-telemetry#42327
-
open-telemetry#42507
-
open-telemetry#42796
-
open-telemetry#43019
-
open-telemetry#43083
-
open-telemetry#43105

#### Link to tracking issue

N/A

#### Testing

N/A

#### Documentation

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exporter/kafka internal/kafka pkg/kafka/configkafka ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kafka topics are not automatically created when using franz-go

4 participants