Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a new resourcedetection detector to extract k8s node UID #26538

Closed
dloucasfx opened this issue Sep 8, 2023 · 7 comments
Closed

Introduce a new resourcedetection detector to extract k8s node UID #26538

dloucasfx opened this issue Sep 8, 2023 · 7 comments
Labels
closed as inactive enhancement New feature or request processor/resourcedetection Resource detection processor question Further information is requested Stale

Comments

@dloucasfx
Copy link
Contributor

Component(s)

processor/resourcedetection

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

[receiver/k8sclusterreceiver] adds the attribute/dimension k8s.node.uid which has all the node labels added as properties and send it along a small set of metrics like k8s.node.condition_ready

We would like to expand the use of k8s.node.uid attribute/value and add it to all (or specific) metrics/logs/traces emitted by the collector so we can propagate and correlate the labels/properties in our backend.

Describe the solution you'd like

Adding a detector to the resourcedetection that pull node specific metadata, in particular k8s.node.uid, would be the ideal solution

Describe alternatives you've considered

I have looked into k8sattributes processor, but it does not pull/expose labels from nodes.
Moreover, I have considered expanding k8sattributes processor to add node labels to it, but after internal discussion, we realized that k8sattributes processor scope is cluster wide whereas the ask here is for metrics related to a specific node.

Additional context

PR #26524

@dloucasfx dloucasfx added enhancement New feature or request needs triage New item requiring triage labels Sep 8, 2023
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Sep 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

Pinging code owners:

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

@bryan-aguilar
Copy link
Contributor

I think the k8sattributes processor already does something similar to this for pods and namespaces. From its README

The k8sattributesprocessor can also set resource attributes from k8s labels and annotations of pods and namespaces

Could this functionality be expanded to also set resource attributes from a nodes labels and annotations?

Further question since I am not familiar with the k8sclusterreceiver. Do you want the node labels from which the metric data point originated from or from where the collector is running?

@bryan-aguilar bryan-aguilar added question Further information is requested processor/k8sattributes k8s Attributes processor and removed needs triage New item requiring triage labels Sep 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

Pinging code owners for processor/k8sattributes: @dmitryax @rmfitzpatrick @fatsheep9146 @TylerHelmuth. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@dmitryax
Copy link
Member

dmitryax commented Sep 8, 2023

Could this functionality be expanded to also set resource attributes from a nodes labels and annotations?

Potentially, yes.

Further question since I am not familiar with the k8sclusterreceiver. Do you want the node labels from which the metric data point originated from or from where the collector is running?

"from where the collector is running" for this issue. That's why we think the resource detection processor is the best place, as other detectors do similar work. We want to have k8s.node.uid resource attribute applied to all the telemetry data when the collector is running in the agent mode, including telemetry data that don't have any other k8s attributes (e.g. hostmetrics receiver metrics)

"node labels from which the metric data point originated" -- this ask (when/if needed) would go to k8sattributes processor. So the collector can set this attribute in both agent and gateway modes when it's possible to deduct it from the existing k8s attributes or the client connection.

@bryan-aguilar
Copy link
Contributor

bryan-aguilar commented Sep 8, 2023

Makes sense to me, thank you for the clarification. Sounds like this would fit in as an enhancement to the resource detection processor.

Copy link
Contributor

github-actions bot commented Dec 8, 2023

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 github-actions bot added the Stale label Dec 8, 2023
Copy link
Contributor

github-actions bot commented Feb 6, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed as inactive enhancement New feature or request processor/resourcedetection Resource detection processor question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

4 participants