Skip to content

Commit

Permalink
Add k8s.node.name and k8s.node.uid to semconv (#1789)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
alikhil and MrAlias authored Apr 12, 2021
1 parent 5c99a34 commit 4d141e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions semconv/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 4d141e4

Please sign in to comment.