ActivityTraceId ActivityTraceId ActivityTraceId ActivityTraceId Struct

Definition

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

public value class ActivityTraceId : IEquatable<System::Diagnostics::ActivityTraceId>
public struct ActivityTraceId : IEquatable<System.Diagnostics.ActivityTraceId>
type ActivityTraceId = struct
Public Structure ActivityTraceId
Implements IEquatable(Of ActivityTraceId)
Inheritance
ActivityTraceIdActivityTraceIdActivityTraceIdActivityTraceId
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>) CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>)

Copies the 16 bytes of the current ActivityTraceId to a specified span.

CreateFromBytes(ReadOnlySpan<Byte>) CreateFromBytes(ReadOnlySpan<Byte>) CreateFromBytes(ReadOnlySpan<Byte>) CreateFromBytes(ReadOnlySpan<Byte>)

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

CreateFromString(ReadOnlySpan<Char>) CreateFromString(ReadOnlySpan<Char>) CreateFromString(ReadOnlySpan<Char>) CreateFromString(ReadOnlySpan<Char>)

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

CreateFromUtf8String(ReadOnlySpan<Byte>) CreateFromUtf8String(ReadOnlySpan<Byte>) CreateFromUtf8String(ReadOnlySpan<Byte>) CreateFromUtf8String(ReadOnlySpan<Byte>)

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

CreateRandom() CreateRandom() CreateRandom() CreateRandom()

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

Equals(ActivityTraceId) Equals(ActivityTraceId) Equals(ActivityTraceId) Equals(ActivityTraceId)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()
ToHexString() ToHexString() ToHexString() ToHexString()

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

ToString() ToString() ToString() ToString()

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

Operators

Equality(ActivityTraceId, ActivityTraceId) Equality(ActivityTraceId, ActivityTraceId) Equality(ActivityTraceId, ActivityTraceId) Equality(ActivityTraceId, ActivityTraceId)
Inequality(ActivityTraceId, ActivityTraceId) Inequality(ActivityTraceId, ActivityTraceId) Inequality(ActivityTraceId, ActivityTraceId) Inequality(ActivityTraceId, ActivityTraceId)

Applies to