You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using topic_from_attribute feature on kafka exporter alongside with the batcher processor, even when there are logs to send to different topics in a single batch, exporter selects topic from one message and sends all messages to that topic.
Relevant code can be seen here.
I tested this only with Logs, but based on the code on the link, I assume this issue occurs with all telemetry types.
Steps to Reproduce
Prepare a collector pipeline with batcher processor and kafka exporter
Use topic_from_attribute=kafka.topic.name on kafka exporter
Send Logs to collector with different topic values on their relevant attribute
Expected Result
Each message is sent to topics according to their kafka.topic.name resource attribute.
Actual Result
Logs in a single batch (a single kafka message) have different resource attributes (and different kafka.topic.name values). As a result, some messages are sent to wrong topics.
Component(s)
exporter/kafka
What happened?
Description
When using
topic_from_attribute
feature on kafka exporter alongside with the batcher processor, even when there are logs to send to different topics in a single batch, exporter selects topic from one message and sends all messages to that topic.Relevant code can be seen here.
I tested this only with Logs, but based on the code on the link, I assume this issue occurs with all telemetry types.
Steps to Reproduce
topic_from_attribute=kafka.topic.name
on kafka exporterExpected Result
Each message is sent to topics according to their
kafka.topic.name
resource attribute.Actual Result
Logs in a single batch (a single kafka message) have different resource attributes (and different
kafka.topic.name
values). As a result, some messages are sent to wrong topics.Collector version
v0.116.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: