open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.9k stars 2.27k forks source link

Have k8sattributesprocessor support normal attribute association #34481

Open hzhang4-sc opened 1 month ago

hzhang4-sc commented 1 month ago

Component(s)

processor/k8sattributes

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

I'm trying to associate the pod metadata labels to the collected cadvisor cpu/memory/network metrics. And due to the cadvisor metrics are collected through the cadvisor agent, it doesn't contain any target info for pod association.

Describe the solution you'd like

Build a new extract action and a new pod_association action to support normal attributes

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 1 month ago

Pinging code owners:

dmitryax commented 1 month ago

Hi @hzhang4-sc what normal attributes do you mean? What attribute are you getting from cadvisor to identify a pod?

hzhang4-sc commented 1 month ago

Hi @dmitryax , by normal attributes I mean the metric data points attributes, not the resource attributes. The label is pod name, and it's named as pod.