fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

OpenTelemtry Log Model Support for Kubernetes Filter Records

Open kevarr opened this issue 1 year ago • 0 comments

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

This issue is related to #8359

In short, my understanding is that #8359 is to add support for the OpenTelemetry Log Model for the OpenTelemetry Output.

There has already been work done to support common metadata key properties in #8475. However, Kubernetes metadata added by the Kubernetes Filter are not currently auto-mapped to their OpenTelemtery equivalent.

Anyone using the Kubernetes Filter along with the OpenTelemetry Output will need to perform this mapping manually.

Describe the solution you'd like

It would be nice for the OpenTelemtry Output to have support for auto mapping records supplied by the Kubernetes Filter into log attributes and log resource attributes that match those provided by OpenTelemtry's k8sattributes processor.

As an example, the record podName could map to k8s.pod.name.

Describe alternatives you've considered

I am currently parsing the log file name to extract the pod_id, handing the log to the OpenTelemetry Collector via the Fluent protocol, restructuring the pod_id attribute to be in the right "place", and finally using the OpenTelemtry k8s-attributes processor to add Kubernetes Metadata.

Having this all done under-the-hood on the FluentBit side would be leaps and bounds better than the current experience.

Additional context

FWIW, I am fine with manually setting the attributes. I'm opening this issue only because I feel like this is an opportunity to save users some effort.

Thank you!

kevarr avatar Mar 18 '24 19:03 kevarr