weaveworks-experiments / kspan

Turning Kubernetes Events into spans
Apache License 2.0
785 stars 56 forks source link

Align attributes with OpenTelemtery semantic conventions #46

Closed pavolloffay closed 2 years ago

pavolloffay commented 2 years ago

The added span attributes do not follow OTEL k8s resource attributes

Screenshot of Jaeger UI (2)

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/k8s.md

Using the same attributes consistently should help to correlate user workflow traces with k8s event traces.

bboreham commented 2 years ago

Happy to follow conventions, but I'm unclear what exactly you would change. I don't see one at that URL for the generic name of an object.

I'm not happy to put any hard-coding of pods, etc., into Kspan.

pavolloffay commented 2 years ago

The idea here is to increase the correlation between traces emitted from various instrumentation. To make this happen instrumentations should use the same attributes names for the same data.

There isn't a generic name for an object. Most likely we would have to use the kind name as part of the attribute name. Some attributes are easier e.g. the namespace.