tarpc icon indicating copy to clipboard operation
tarpc copied to clipboard

Distributed tracing with TextMapPropagator

Open rlebran opened this issue 1 year ago • 3 comments

Hi, Is there any way of using tarpc with a TextMapPropagator to propagate opentelemetry headers or to extend the tracing context allowing more properties to pass by (with an HashMap for example)? This would allow custom opentelemetry implementation to work with tarpc (Datadog for example).

rlebran avatar May 21 '24 16:05 rlebran

Thanks for your question! Apologies for the delay in responding.

I don't think this is supported by tarpc today. Can you provide an example of properties that are needed by Datadog? Their docs suggest Datadog supports the W3C trace context standard, so I assume there is some support already, based on what tarpc makes available to Opentelemetry?

tikue avatar Aug 12 '24 00:08 tikue

Hi ! In my current datadog implementation few custom headers are required: x-datadog-trace-id, x-datadog-parent-id and x-datadog-sampling-priority. I was looking at something like TextMapPropagator to pass those properties automatically at the bounds of my services. To do so I thing tarpc would need to support some kind of metadata / headers which is not the case right now. But looking at the doc you linked, it might not be necessary anymore !

rlebran avatar Aug 15 '24 08:08 rlebran

Cool, give it a shot and let me know if there are any issues!

tikue avatar Aug 15 '24 20:08 tikue