envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.75k stars 4.75k forks source link

Send custom key-value pairs in ot-span-context to Zipkin #2031

Open mumoshu opened 6 years ago

mumoshu commented 6 years ago

Thanks for maintaining the great project 👍

Envoy does seem to propagate ot-span-context but drops most of the key-values included in it before sending it to Zipkin.

Would it be possible to send those key-values as binary annotations of Zipkin spans? Could I contribute it?

Context:

mattklein123 commented 6 years ago

cc @objectiser @rnburn @tedsuo

objectiser commented 6 years ago

There seems to be two parts to this request, (1) provide a concept like OpenTracing baggage for zipkin context propagation, and then (2) be able to record (selected) baggage items in the spans themselves.

I agree (2) can be useful in some cases.

The problem is that zipkin doesn't support baggage. Although as you suggest, we could add it to the ot-span-context header property, if the service wanted to use a zipkin tracer (instead of manually propagating the context to outbound requests), i.e. to add other internal spans, then the additional baggage added to ot-span-context would be lost.

fruffy commented 3 years ago

Just to get a sense of the current landscape: What is the status on this? I see this comment in the zipkin trace implementation: https://github.com/envoyproxy/envoy/blob/main/source/extensions/tracers/zipkin/zipkin_tracer_impl.cc#L40