-
Notifications
You must be signed in to change notification settings - Fork 12
Add Kubernetes semantics to SpanAttributes #46
Add Kubernetes semantics to SpanAttributes #46
Conversation
Built out a suite of Kubernetes SpanAttributes conforming to SemConv of Otel. This adheres to https://opentelemetry.io/docs/specs/semconv/resource/k8s/.
b74ed80
to
104f202
Compare
Sources/TracingOpenTelemetrySemanticConventions/SpanAttributes+KubernetesSemantics.swift
Show resolved
Hide resolved
Missed in initial push
metadata should have been key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, do you want to have a look @slashmo @czechboy0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to add these attributes here but technically they're resource attributes, meaning they shouldn't need to be attached to individual spans but to the resource exporting them (in OTel terms). So far we only added span convention attributes here.
Apart from that, do we want to stay consistent in the URLs we use to link to the semconv spec? Elsewhere we linked to the repo which has the advantage that we can link to a specific tag, e.g. https://github.com/open-telemetry/opentelemetry-specification/blob/v1.11.0/specification/trace/semantic_conventions/span-general.md#source-code-attributes
.
I would like to be consistent and missed that originally as well. Really appreciate the guidance here. I will look to specify the repo link in a forthcoming commit edit -> I did a bit of digging, and it looks like the otel upstream have split out semantic-conventions into their own repository here https://github.com/open-telemetry/semantic-conventions/blob/v1.30.0/model/k8s/resources.yaml. I poked around briefly to find the the human readable .md but didn't find it at first quick glance. Might be worth the discussion if there is a further update to cross over with this new repo, and which portion do we position with? the docs or the model itself. I am okay with either, but defer to the maintainer's guidance here before making further changes to the PR. search journey: |
This PR has been moved to a more appropriate repository where consolidation is planned for conventions in the future across resources. swift-otel/swift-otel-semantic-conventions#3 |
Built out a suite of Kubernetes SpanAttributes conforming to SemConv of Otel. This adheres to https://opentelemetry.io/docs/specs/semconv/resource/k8s/.