編集

次の方法で共有


ActivityTraceId Struct

Definition

Represents a TraceId whose format is based on a W3C standard.

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

Remarks

The ActivityTraceId structure reflects the format that the W3C standard requires for the ID of the entire trace. It consists of 16 bytes, typically represented as 32 hexadecimal characters. An ActivityTraceId is returned by the TraceId property.

Because an ActivityTraceId is a structure that contains 16 bytes, it can be passed easily by reference. ActivityTraceId contains methods for converting to and from its 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 16 bytes of the current ActivityTraceId to a specified span.

CreateFromBytes(ReadOnlySpan<Byte>)

Creates a new ActivityTraceId value from a read-only span of 16 bytes.

CreateFromString(ReadOnlySpan<Char>)

Creates a new ActivityTraceId value from a read-only span of 32 hexadecimal characters.

CreateFromUtf8String(ReadOnlySpan<Byte>)

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

CreateRandom()

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

Equals(ActivityTraceId)

Determines whether the current instance and a specified ActivityTraceId are equal.

Equals(Object)

Determines whether this instance and a specified object, which must also be an ActivityTraceId instance, have the same value.

GetHashCode()

Returns the hash code of the TraceId.

ToHexString()

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

ToString()

Returns a 32-character hexadecimal string that represents this trace ID.

Operators

Equality(ActivityTraceId, ActivityTraceId)

Determines whether two specified ActivityTraceId instances have the same value.

Inequality(ActivityTraceId, ActivityTraceId)

Determines whether two specified ActivityTraceId instances have the same value.

Applies to