cni icon indicating copy to clipboard operation
cni copied to clipboard

libcni should support distributed tracing

Open bboreham opened this issue 6 years ago • 4 comments

Broadly, it needs to pass a span identifier across from the caller to the plugin.

Probably something to do with OpenTracing. Details left as an exercise.

bboreham avatar Jun 13 '18 15:06 bboreham

At the top level of libcni we would do something like:

span, ctx := opentracing.StartSpanFromContext(ctx, "ADD")

(so all the entry points need to add a context parameter)

Then when executing a plugin we would extract the SpanContext via span.Context(), then serialise via ForeachBaggageItem() to something like an environment variable, then unpack that on the other side of the plugin execution and create a new span there.

bboreham avatar Jun 27 '18 15:06 bboreham

Note that there is no tracing in Kubernetes at the moment (https://github.com/kubernetes/kubernetes/issues/26507). Still, it might be useful if CNI itself is a performance concern, or for other orchestrators.

(The upshot of that Kubernetes issue, that everything is async, is less relevant inside kubelet)

bboreham avatar Jun 27 '18 15:06 bboreham

Does the community plan to develope this feature? Thanks!

I've found these, some related topics are under discussion.

https://github.com/kubernetes/enhancements/pull/650 https://github.com/containerd/containerd/issues/3057 https://github.com/kubernetes/kubernetes/issues/26507

warmchang avatar Mar 14 '19 07:03 warmchang

/cc

aojea avatar Mar 20 '21 16:03 aojea