Skip to content

[exporter/kafka] add compression_level to kafka producer configuration #39772

Open
@vidam-io

Description

@vidam-io

Component(s)

exporter/kafka

Is your feature request related to a problem? Please describe.

I would like to use zstd compression with level 1 in the Kafka exporter. Currently, the Kafka exporter only supports the default compression level (level 3), which may not be optimal for scenarios requiring faster compression and lower CPU usage.

Describe the solution you'd like

The Kafka exporter internally uses the Sarama library, which supports both setting the compression type and compression level via its configuration.

I propose extending the Kafka exporter configuration to include a compression.level field. This field can then be passed to the Sarama Config.Producer.CompressionLevel parameter when initializing the producer.

Describe alternatives you've considered

None identified.

Additional context

Related PR: #39647

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions