-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
support k8s.pod.hostname #18494
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@alburthoffman how would you fetch the pod host name from k8s API? |
the hostname is a part of pod spec, which is described here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-hostname-and-subdomain-fields |
I see. Ideally the hostname first should be added here https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/resource/k8s.yaml#L48 ? Can you submit a PR for semantic conventions and the k8sattributes processor? |
sounds good. working on it. Thx |
Fixed by #18506 |
Component(s)
processor/k8sattributes
Is your feature request related to a problem? Please describe.
Spans from our client contain a host attribute, which is pod's hostname in the metadata.
And the bad news is pod's name is a little different from hostname.
Describe the solution you'd like
refer to this function: https://github.com/alburthoffman/opentelemetry-collector-contrib/blob/main/processor/k8sattributesprocessor/internal/kube/client.go#L288
We want to associate pod metadata based on the host attribute. But since k8s processor only support pod name, we could not do this.
Describe alternatives you've considered
had tried to constructs the pod name from the host attribute, but it requires using regex to extract substring.
And it also assumes that the name convention as well.
Overall it is not a good idea to do that by binding the name convention in our side.
Additional context
No response
The text was updated successfully, but these errors were encountered: