fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
578 stars 246 forks source link

Support logs_body_key_attributes in OpenTelemetry output plugin #1321

Closed LKummer closed 1 month ago

LKummer commented 1 month ago

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

The logs_body_key_attributes of the OpenTelemetry output plugin is not yet supported by the operator. It was added in https://github.com/fluent/fluent-bit/commit/202da1374dffd98984b2aa56dd444d49bef1dbd5.

I've been using the custom plugin option to enable it, and would like to have it supported by the output plugin CRDs.

apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterOutput
# ...
spec:
  customPlugin:
    config: |
      name opentelemetry
      match kube.*
      host telemetry-exporter-components-collector
      port 4318
      logs_body_key_attributes true
  matchRegex: kube\.(.*)

Describe the solution you'd like

Add logsBodyKeyAttributes to OpenTelemetry output plugin schema.

I'd love to contribute the change, and will soon shoot a PR for it.

Additional context

No response