Description
Component(s)
exporter/kafka
Is your feature request related to a problem? Please describe.
We've migrated our logging pipeline partially to Otel. We used to have a ELK stack, and now we still persist the logstash that receives logs from a Kafka topic, and insert them to ElasticSearch. On the producer side, we have an Otel collector with Kafka exporter. To keep the backward compatibility, we use the raw
encoding in the Kafka exporter, but it doesn't support partition_logs_by_resource_attributes
:
opentelemetry-collector-contrib/exporter/kafkaexporter/marshaler.go
Lines 90 to 98 in 0e087ff
I don't see why the raw encoding can't do the same thing as other encodings. The raw marshaler indeed discards the resource and record attributes in the end result (i.e. the message sent to the Kafka), but it still has the access to attributes during marshalling, just as other marshalers.
Describe the solution you'd like
The raw encoding should support partition_logs_by_resource_attributes
too. Also if #38484 is accepted, raw encoding should also support it.
Describe alternatives you've considered
No response
Additional context
No response