mule-opentelemetry-module icon indicating copy to clipboard operation
mule-opentelemetry-module copied to clipboard

working with kafka

Open GabrielMller opened this issue 1 year ago • 5 comments

Hi, I'm working with Kafka on Mulesoft, and I would like to pass the trace id from the publisher to the consumer, I tried to put a traceparent header, but the trace id did not propagate, is there already a way to do this or has it not been implemented yet?

GabrielMller avatar Oct 18 '23 13:10 GabrielMller

@GabrielMller As per specs, traceparent does include traceId. See details about traceparent here. It is used by the consumer to establish parent-child relationship of the distributed traces. If the consumer side is this module, then that relationship will be established but the module does not pass or extract traceId from that traceparent.

If you need to send traceId as a separate header then you can set it, just like traceparent. vars.OTEL_TRACE_CONTEXT.traceId can give you the current trace id for propagating. Documentation was missing the latest screenshot but #115 should correct that gap.

I hope that answers what you are looking for.

manikmagar avatar Oct 18 '23 13:10 manikmagar

I need to propagate my trace from the application of the publisher, to the application consumer, i tried to pass a traceId header, but the otel connector dont get it. image

GabrielMller avatar Oct 18 '23 14:10 GabrielMller

@GabrielMller Thanks for the clarification. You are looking to propagate the trace context across the Kafka connector. Unfortunately, that is not implemented yet and hence module is unable to identify context on the consumer side. Thanks for raising this though, we will plan to look into this.

manikmagar avatar Oct 18 '23 14:10 manikmagar

Ok, thanks for your help!

GabrielMller avatar Oct 18 '23 15:10 GabrielMller

Hi ,is this implemented yet ? Or is there any plans to implement it in the near future?

JYOTHI-SHRAVZ avatar Apr 21 '24 19:04 JYOTHI-SHRAVZ