open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.06k stars 2.36k forks source link

Allow Kafka exporter to select topic from context #34432

Closed tylerbenson closed 1 month ago

tylerbenson commented 3 months ago

Component(s)

exporter/kafka

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

The kafka exporter currently allows exporting to a fixed topic or a topic from an attribute in the data. When using an attribute, if the topic name isn't already in the data for some reason, the topic name inherently pollutes the data.

Describe the solution you'd like

I would like to be able to pull the topic name from the context. This would allow prior components in the pipeline to define/customize the topic name without modifying the data being exported.

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 3 months ago

Pinging code owners: