From a1668840a740c1a689e6c0e7c6878b19b46ca28e Mon Sep 17 00:00:00 2001 From: alburthoffman Date: Wed, 15 Feb 2023 14:24:17 -0800 Subject: [PATCH] support k8s.pod.hostname --- CHANGELOG.md | 2 ++ semantic_conventions/resource/k8s.yaml | 5 +++++ specification/resource/semantic_conventions/k8s.md | 1 + 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a70e5f5c99..3e12c10819c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ release. - Move X-Ray Env Variable propagation to span link instead of parent for AWS Lambda. ([#3166](https://github.com/open-telemetry/opentelemetry-specification/pull/3166)) +- Support pod.spec.hostname in resource k8s.pod + ([#3201])[https://github.com/open-telemetry/opentelemetry-specification/pull/3201] ### Compatibility diff --git a/semantic_conventions/resource/k8s.yaml b/semantic_conventions/resource/k8s.yaml index 1513f201663..2e561766c19 100644 --- a/semantic_conventions/resource/k8s.yaml +++ b/semantic_conventions/resource/k8s.yaml @@ -56,6 +56,11 @@ groups: brief: > The name of the Pod. examples: ['opentelemetry-pod-autoconf'] + - id: hostname + type: string + brief: > + The hostname in the pod spec. refer to [pod.spec.hostname](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-hostname-and-subdomain-fields) + examples: ['opentelemetry-pod-autoconf'] - id: k8s.container prefix: k8s.container diff --git a/specification/resource/semantic_conventions/k8s.md b/specification/resource/semantic_conventions/k8s.md index 2b2387c54c6..0359b9160f3 100644 --- a/specification/resource/semantic_conventions/k8s.md +++ b/specification/resource/semantic_conventions/k8s.md @@ -69,6 +69,7 @@ containers on your cluster. |---|---|---|---|---| | `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | | `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | Recommended | +| `k8s.pod.hostname` | string | The hostname in the pod spec. refer to [pod.spec.hostname](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-hostname-and-subdomain-fields) | `opentelemetry-pod-autoconf` | Recommended | ## Container