opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Question: Add propagation through RabbitMQ messages

Open nchandran3 opened this issue 4 years ago • 2 comments

Is it possible / advisable to add propagation logic for RabbitMQ messages, much like HTTPInjectors / HTTPExtractors.

If so, interested in contributing these.

nchandran3 avatar Sep 29 '20 20:09 nchandran3

I've moved this issue to the opentelemetry-go-contrib repo as that is where such instrumentation would live. Instrumentation for non-HTTP message-based systems is definitely desirable. You can take a look at the Sarama instrumentation for an example of how such a system might be integrated with existing TextMap-based propagators. Specifically, here where it sets up wrappers around Kafka message headers to act as Suppliers for the existing propagators. As long as RabbitMQ has a similar header mechanism I'd imagine a similar instrumentation pattern would work.

Aneurysm9 avatar Sep 29 '20 20:09 Aneurysm9

Indeed @Aneurysm9 , rabbitmq supports headers for each message and they can be used to propagate TraceId and SpanId

brianmori avatar Oct 14 '21 17:10 brianmori