Skip to content

Support W3C Baggage propagation without Activity #103174

@lmolkova

Description

@lmolkova

Related to #45496

W3C Baggage defines a propagation format for arbitrary application-specific properties.
Despite being driven by the observability community, it's not related to W3C Trace-Context and could work without distributed tracing.

In .NET however, baggage API is part of the System.Diagnostics.Activity which allows to get/set baggage. It implies that users have to have distributed tracing enabled in order to propagate baggage.

To support W3C Baggage fully, .NET would need to define an API similar to OTel Baggage:

  • NewBaggage.Current would be backed up by AsyncLocal
  • NewBaggage would allow to add/get/remove/enumerate baggage

It could be done in a backward compatible way such that Activity.Baggage would work over NewBaggage, but it would be great to consider an alternative approach of sunsetting Activity.Baggage or at least methods allowing to add/modify it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions