Modifica

Condividi tramite


ActivitySpanId Struct

Definition

Represents a SpanId formatted based on a W3C standard.

public value class ActivitySpanId : IEquatable<System::Diagnostics::ActivitySpanId>
public readonly struct ActivitySpanId : IEquatable<System.Diagnostics.ActivitySpanId>
type ActivitySpanId = struct
Public Structure ActivitySpanId
Implements IEquatable(Of ActivitySpanId)
Inheritance
ActivitySpanId
Implements

Remarks

The ActivitySpanId structure reflects the format that the W3C standard requires for the ID of a single span in a trace. It consists of 8 bytes, typically displayed as 16 hexadecimal characters. An ActivitySpanId is returned by the SpanId for an Activity whose Activity.IdFormat is W3C.

Because an ActivitySpanId is a structure that contains 8 bytes, it can be passed by reference. ActivitySpanId contains methods for converting to and from hexadecimal string representation, tries to avoid changing formats until it has to, and caches its string representation after it is created. It is mostly useful as an exchange type.

Methods

CopyTo(Span<Byte>)

Copies the 8 bytes of the current ActivitySpanId to a specified span.

CreateFromBytes(ReadOnlySpan<Byte>)

Creates a new ActivitySpanId value from a read-only span of eight bytes.

CreateFromString(ReadOnlySpan<Char>)

Creates a new ActivitySpanId value from a read-only span of 16 hexadecimal characters.

CreateFromUtf8String(ReadOnlySpan<Byte>)

Creates a new ActivitySpanId value from a read-only span of UTF8-encoded bytes.

CreateRandom()

Creates a new ActivitySpanId based on a random number (that is very likely to be unique).

Equals(ActivitySpanId)

Determines whether this instance and the specified ActivitySpanId instance have the same value.

Equals(Object)

the current instance and a specified object, which also must be an ActivitySpanId instance, have the same value.

GetHashCode()

Returns the hash code of the SpanId.

ToHexString()

Returns a 16-character hexadecimal string that represents this span ID.

ToString()

Returns a 16-character hexadecimal string that represents this span ID.

Operators

Equality(ActivitySpanId, ActivitySpanId)

Determines whether two specified ActivitySpanId instances have the same value.

Inequality(ActivitySpanId, ActivitySpanId)

Determine whether two specified ActivitySpanId instances have unequal values.

Applies to