diff --git a/.chloggen/feat_42156.yaml b/.chloggen/feat_42156.yaml new file mode 100644 index 0000000000000..f0994d92a6ce6 --- /dev/null +++ b/.chloggen/feat_42156.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: "enhancement" + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: exporter/kafkaexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Use franz-go client for Kafka exporter as default, promoting the exporter.kafkaexporter.UseFranzGo feature gate to Beta." + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [42156] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/exporter/kafkaexporter/README.md b/exporter/kafkaexporter/README.md index 126b89c677b7e..d1a2a4ebfb884 100644 --- a/exporter/kafkaexporter/README.md +++ b/exporter/kafkaexporter/README.md @@ -23,7 +23,7 @@ processors for higher throughput and resiliency. Message payload encoding is con ## Configuration settings > [!NOTE] -> You can opt-in to use [`franz-go`](https://github.com/twmb/franz-go) client by enabling the feature gate +> You can opt out of using the [`franz-go`](https://github.com/twmb/franz-go) client by disabling the feature gate > `exporter.kafkaexporter.UseFranzGo` when you run the OpenTelemetry Collector. See the following page > for more details: [Feature Gates](https://github.com/open-telemetry/opentelemetry-collector/tree/main/featuregate#controlling-gates) diff --git a/exporter/kafkaexporter/kafka_exporter.go b/exporter/kafkaexporter/kafka_exporter.go index 2e499368f4023..b9f4be5eeab77 100644 --- a/exporter/kafkaexporter/kafka_exporter.go +++ b/exporter/kafkaexporter/kafka_exporter.go @@ -38,7 +38,7 @@ const franzGoClientFeatureGateName = "exporter.kafkaexporter.UseFranzGo" // will use the franz-go client, which is more performant and has better support for // modern Kafka features. var franzGoClientFeatureGate = featuregate.GlobalRegistry().MustRegister( - franzGoClientFeatureGateName, featuregate.StageAlpha, + franzGoClientFeatureGateName, featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, the Kafka exporter will use the franz-go client to produce messages to Kafka."), featuregate.WithRegisterFromVersion("v0.128.0"), ) @@ -109,7 +109,7 @@ func (e *kafkaExporter[T]) Start(ctx context.Context, host component.Host) (err kgo.WithHooks(kafkaclient.NewFranzProducerMetrics(tb)), ) if ferr != nil { - return err + return ferr } e.producer = kafkaclient.NewFranzSyncProducer(producer, e.cfg.IncludeMetadataKeys,