Activity.Baggage Property

Definition

Gets a collection of key/value pairs that represents information that is passed to children of this Activity.

C#
public System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string?>> Baggage { get; }
C#
public System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>> Baggage { get; }

Property Value

Information that's passed to children of this Activity.

Remarks

Baggage is serialized when requests leave the process (along with the ID). Typically, Baggage is used for fine-grained control over logging of the activity and any children. In general, if you are not using the data at runtime, you should be using Tags instead.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)