1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-26 03:52:03 +02:00

Add k8s.node.name and k8s.node.uid to semconv (#1789)

* Add k8s.node.name and k8s.node.uid to semconv

According to the specification[1] they should exist.

[1] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/k8s.md#node

* Update changelog

* Update semconv/resource.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update semconv/resource.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update semconv/resource.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Alik Khilazhev 2021-04-12 18:21:13 +03:00 committed by GitHub
parent 5c99a34cd8
commit 4d141e4752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770)
- The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771)
- The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771)
- Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789)
### Fixed

View File

@ -128,6 +128,12 @@ const (
// GKE clusters have a name which can be used for this attribute.
K8SClusterNameKey = attribute.Key("k8s.cluster.name")
// The name of the Node.
K8SNodeNameKey = attribute.Key("k8s.node.name")
// The UID of the Node.
K8SNodeUIDKey = attribute.Key("k8s.node.uid")
// The name of the namespace that the pod is running in.
K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")