open-telemetry / opentelemetry-collector-contrib

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

[receiver/kubeletstats] Optionally add labels and annotations from node as resource attributes to node metrics #27909

Open TylerHelmuth opened 1 year ago

TylerHelmuth commented 1 year ago

Component(s)

receiver/kubeletstats

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

The kubeletstatsreceiver collects several node-related metrics and it would be helpful to be able to add node labels and annotations as resource attributes to these metrics.

Describe the solution you'd like

The ability to enable the receiver to add node labels and annotations as resource attributes. The labels/annotations should be taken as is, with no manipulation applied.

Describe alternatives you've considered

No response

Additional context

Closely related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/22620, but the receiver should have the capability to add the attributes itself.

github-actions[bot] commented 10 months ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] commented 8 months ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] commented 5 months ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

ChrsMark commented 4 months ago

It should be doable by utilizing the existing nodeInformer.

Something to clarify here is if the option will be adding all labels/annotations or we want to provide the option to configure specific sets. Maybe we want to support both options, having the default behavior adding them all unless a specific set is provided.

Another thing would be to define the namespace for them in alignment with the Semantic Conventions. Today we only have SemConv defined for Pod's labels/annotations. Defining a k8s.node.label* namespace maybe makes sense in terms of better scoping etc but maybe having a unified k8s.label.* namespace would also make sense (https://github.com/open-telemetry/semantic-conventions/issues/1242).

github-actions[bot] commented 1 month ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.