How can I have per instrumentation propagators?
Hi,
While looking at the Kafka implementation I noticed that OpenTelemetry.propagation.inject is a share singleton across all of the running instrumentations. I'm wondering if its possible to have per instrumentation propagators in situations where there are different trace context protocols.
To the best of my understanding, opentelemtry-ruby would need to have some kind of mechanism for this to be able to support AMQP and MQTT trace contexts following the W3 standard. It also appears, with regards to Kafka, that the current implementation of trace context instrumentation is undefined since there is no registry entry for the protocol?
Thanks, Hunter
Thanks for the reference. From that, I see that protocol-specific (MQTT, AMQP, HTTP, etc.) encodings are defined. This should be handled with protocol-specific Getters and Setters rather than per instrumentation propagators, although you could choose instead to add a configuration option to instrumentation to override the propagator.
with regards to Kafka, that the current implementation of trace context instrumentation is undefined since there is no registry entry for the protocol
That's an interesting point. My knowledge of Kafka is not that deep, but if this is a problem, it presumably affects all OTel language implementations that instrument Kafka. It should be brought up at the spec level. If you have sufficient context, can you please open an issue in the https://github.com/open-telemetry/opentelemetry-specification repo?
Thanks for the guidance! I'll work on getting something written up for the specification repo.
Hunter
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.