-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[exporter/kafkaexporter] Enable Partitioning by Specific Attribute for Logs & Metrics #38484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
More details need to be discussed regarding the scenario where a user sets both partition_logs_by_resource_attributes: true and partition_metrics_by_attribute: <name_of_the_attribute>. What behavior will the collector exhibit in this case? For me, I prefer the partition_metrics_by_attribute configuration to take precedence. |
i agree |
I'd like to work on this issue if it's accepted by the owners/maintainers as this is a blocker for us too. Also cc the new owner @axw |
I'm definitely on board with partitioning by attributes. I'd ideally like to see a more complete design for the configuration, e.g.
In #38985 I'm planning to make topic & encoding configuration signal-specific (and I have a WIP branch for the exporter). I think it makes sense to do the same for partitioning, which would enable us to partition on properties that are signal-specific.
Generally speaking I would expect
I haven't thought about all of this in great depth, but here's a rough proposal for discussion:
I don't know what the new
We could potentially use OTTL for defining the message key, which would give the greatest flexibility. That way we may also get to use OTTL's context inference for deciding how to group data before encoding to a message. That may imply a single message for each span if you're using |
@axw is this something that you plan to work on? Or should we add the |
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
exporter/kafka
Is your feature request related to a problem? Please describe.
Currently, the Kafka exporter supports partitioning traces by
trace id
, which is very useful for context-aware data processing. However, for logs and metrics, we only have options likepartition_metrics_by_resource_attributes
andpartition_logs_by_resource_attributes
. These work well for load-balancing Kafka partitions but fall short when we need to partition data based on a single, specific attribute of a log/metric (such astrace_id
ortenant_id
). This limitation complicates tasks like merging related logs or metrics for enhanced processing.Describe the solution you'd like
I propose introducing configuration options that allow specifying one attribute for partitioning logs and metrics. For instance, options like:
This would extend the functionality provided for traces to logs and metrics, enabling context-aware data routing (e.g., merging by a specific attribute like trace_id, tenant_id, etc.) and improving the overall flexibility of the Kafka exporter.
Describe alternatives you've considered
There is non i could see, bar from exporting to kafka as-is, and then consuming and reemitting them into kafka with the proper partitioning by a custom service.
Additional context
No response
The text was updated successfully, but these errors were encountered: