<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0-preview.7.24405.7" />

ActivityContext

A representation that 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; }

Indicates if the activity context was propagated from a remote parent.

public ActivitySpanId SpanId { get; }

The Id of the request as known by the caller.

The flags 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.

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

Construct a new activity context instance using the specified arguments.

public static bool op_Equality(ActivityContext left, ActivityContext right)

Determines whether two specified ActivityContext values are equal.

public static bool op_Inequality(ActivityContext left, ActivityContext right)

Determines whether two specified ActivityContext values are not equal.

public static ActivityContext Parse(string traceParent, string traceState)

Parses a W3C trace context headers to an ActivityContext object.

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

Tries to parse the W3C trace context headers to the ActivityContext object.

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

Tries to parse the W3C trace context headers to an ActivityContext object.

public bool Equals(ActivityContext value)

Indicates whether the current object is equal to another object of the same type.