weaveworks-experiments / kspan

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

Use OpenTelemetry conventions for some tags. #48

Closed bboreham closed 2 years ago

bboreham commented 2 years ago

Resolves #46. I think this is what @pavolloffay asked for.

k8s.namespace.name instead of namespace, and k8s.pod.name, k8s.job.name, etc., instead of object.

Also omit the namespace tag if it is blank, e.g. for a Node, and add the kind for a top-level object.

image

pavolloffay commented 2 years ago

I think we should as well add option to capture UIDs

bboreham commented 2 years ago

I’m a bit negative on Kubernetes UIDs, since there isn’t any API to fetch an object by UID. What would you expect to do with one?

pavolloffay commented 2 years ago

What would you expect to do with one?

The object names are not unique enough, the same name can be used to reference two different objects. The UID can be used to correlate data on the observability platform - .e.g. workload traces have pod/deployment/ss UID and I could use this to UID to get associate k8s event trace.

The collection of UIDs should be optional and disabled by default. We could add it in a separate PR.

bboreham commented 2 years ago

I'll merge this for now and UIDs can be a follow-up.