Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Diagnostics.​ActivityContext
Assembly: System.Diagnostics.DiagnosticSource
Implemented Interfaces
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.
Properties
public
ActivityTraceId
TraceId
The trace identifier.
public
ActivitySpanId
SpanId
The Id of the request as known by the caller.
public
ActivityTraceFlags
TraceFlags
The flags defined by the W3C standard along with the ID for the activity.
public
string
TraceState
Holds the W3C 'tracestate' header.
public
bool
IsRemote
Indicates if the activity context was propagated from a remote parent.
Methods
public static
bool
TryParse​(string traceParent,
string traceState,
ActivityContext& context)
public static
bool
TryParse​(string traceParent,
string traceState,
bool isRemote,
ActivityContext& context)
public static
ActivityContext
Parse​(string traceParent,
string traceState)
Parses a W3C trace context headers to an <see cref="T:System.Diagnostics.ActivityContext" /> object.
Returns The <see cref="T:System.Diagnostics.ActivityContext" /> object created from the parsing operation.
traceParent
The W3C trace parent header.
traceState
The trace state.
public
bool
Equals​(ActivityContext value)
Indicates whether the current object is equal to another object of the same type.
Returns <see langword="true" /> if the current object is equal to the <paramref name="value" /> parameter; otherwise, <see langword="false" /> .
value
The object to compare to this instance.
public
bool
Equals​(object obj)
Determines whether this instance and a specified <see langword="ActivityContext" /> object have the same value.
Returns <see langword="true" /> if the current object is equal to the <paramref name="obj" /> parameter; otherwise, <see langword="false" /> .
obj
The object to compare to this instance.
public
int
GetHashCode​()
Provides a hash function for the current <see langword="ActivityContext" /> that's suitable for hashing algorithms and data structures, such as hash tables.
Returns A hash code for the current <see langword="ActivityContext" /> .
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object