Closed MarcusKohnert closed 1 month ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
@lmolkova : Would you mind offering your insight?
Thanks @MarcusKohnert !
The short answer is no, unfortunately Baggage is not supported - https://github.com/Azure/azure-sdk/issues/6959 The long answer - we don't have a good way to support it in OTel-compatible way - https://github.com/open-telemetry/opentelemetry-dotnet/issues/5667:
TL;DR: OTel does not recommend using Activity.Baggage
and does not support propagating it. It has a separate baggage implementation outside of .NET BCL.
The propagation used by .NET is DistributedContextPropagator
- its default implementation uses a different header name (Correlation-Context
) than OTel (https://w3c.github.io/baggage/).
If we did use DistributedContextPropagator
in .NET libraries, our .NET messaging would become incompatible with our instrumentation in other languages in the default case.
So the only viable path forward I see is to fix the problem on the OTel side before we can support baggage properly.
Hi @MarcusKohnert. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
@lmolkova Thank you very much for the explanation.
Library name and version
Azure.Messaging.ServiceBus 7.17.5
Query/Question
@lmolkova wrote here that OpenTelemetry Baggage will be gradually adopted once it is approved.
I couldn't find any information if that adoption took place already. Here it sounds like it should work.
I couldn't get Baggage propagation over process boundaries working in my local development setup.
This is my scenario:
Process A, populates Baggage items via Activity.Current?.SetBaggage("", "") Process A, sends message to Azure Service Bus Process B, receives message from Azure Service Bus
Expected result:
Process B, Activity.Current has Baggage items
Actual result:
Process B, Activity.Current has no baggage
Is Baggage propagation already supposed to work? If yes, do I need to turn on specific things (Flags or similar)? Is maybe the transport mechanism to ServiceBus relevant?
Thanks for any hints or pointers?
Environment