<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0-preview.2.23128.3" />

ActivityContext

ActivityContext representation conforms to the w3c TraceContext specification. It contains two identifiers a TraceId and a SpanId - along with a set of common TraceFlags and system-specific TraceState values.
public bool IsRemote { get; }

IsRemote indicates if the ActivityContext was propagated from a remote parent.

public ActivitySpanId SpanId { get; }

The span identifier

These flags are defined by the W3C standard along with the ID for the activity.

public ActivityTraceId TraceId { get; }

The trace identifier

public string TraceState { get; }

Holds the W3C 'tracestate' header as a string.

public ActivityContext(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags traceFlags, string traceState = null, bool isRemote = false)

Construct a new object of ActivityContext.

public static bool op_Equality(ActivityContext left, ActivityContext right)

public static bool op_Inequality(ActivityContext left, ActivityContext right)

public static ActivityContext Parse(string traceParent, string traceState)

Parse W3C trace context headers to ActivityContext object.

public static bool TryParse(string traceParent, string traceState, bool isRemote, out ActivityContext context)

Parse W3C trace context headers to ActivityContext object.

public static bool TryParse(string traceParent, string traceState, out ActivityContext context)

Parse W3C trace context headers to ActivityContext object.

public bool Equals(ActivityContext value)