opentelemetry-go-contrib
opentelemetry-go-contrib copied to clipboard
Question: Add propagation through RabbitMQ messages
Is it possible / advisable to add propagation logic for RabbitMQ messages, much like HTTPInjectors
/ HTTPExtractors
.
If so, interested in contributing these.
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.
Indeed @Aneurysm9 , rabbitmq supports headers for each message and they can be used to propagate TraceId and SpanId