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
### Description
Added log partitioning capability to the Kafka Exporter. When the
`partition_logs_by_trace_id` option is enabled, log records are
distributed to Kafka partitions based on their TraceID. Records without
a TraceID fall back to the default partitioning strategy. If
`partition_logs_by_resource_attributes` is also enabled, resource
attribute partitioning takes precedence over TraceID partitioning.
### Link to tracking issue
Fixes#39146
### Testing
- Added unit tests to validate TraceID-based log partitioning and option
precedence logic.
- Verified correct partitioning for various combinations of TraceIDs and
resource attributes.
### Documentation
- Updated `exporter/kafkaexporter/README.md` with usage details and
examples for `partition_logs_by_trace_id`.
- Included related changelog updates.
---------
Co-authored-by: Andrew Wilkins <[email protected]>
Copy file name to clipboardExpand all lines: exporter/kafkaexporter/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@ The following settings can be optionally configured:
54
54
-`partition_traces_by_id` (default = false): configures the exporter to include the trace ID as the message key in trace messages sent to kafka. *Please note:* this setting does not have any effect on Jaeger encoding exporters since Jaeger exporters include trace ID as the message key by default.
55
55
-`partition_metrics_by_resource_attributes` (default = false) configures the exporter to include the hash of sorted resource attributes as the message partitioning key in metric messages sent to kafka.
56
56
-`partition_logs_by_resource_attributes` (default = false) configures the exporter to include the hash of sorted resource attributes as the message partitioning key in log messages sent to kafka.
57
+
--`partition_logs_by_trace_id` (default = false): configures the exporter to partition log messages by trace ID, if the log record has one associated. Note: `partition_logs_by_resource_attributes` and `partition_logs_by_trace_id` are mutually exclusive, and enabling both will lead to an error.
57
58
-`tls`: see [TLS Configuration Settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) for the full set of available options.
58
59
-`auth`
59
60
-`plain_text` (Deprecated in v0.123.0: use sasl with mechanism set to PLAIN instead.)
0 commit comments