Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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.
Copy |
Copies the 16 bytes of the current ActivityTraceId to a specified span. |
Create |
Creates a new ActivityTraceId value from a read-only span of 16 bytes. |
Create |
Creates a new ActivityTraceId value from a read-only span of 32 hexadecimal characters. |
Create |
Creates a new ActivityTraceId value from a read-only span of UTF8-encoded bytes. |
Create |
Creates a new ActivityTraceId based on a random number (that is very likely to be unique). |
Equals(Activity |
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. |
Get |
Returns the hash code of the TraceId. |
To |
Returns a 32-character hexadecimal string that represents this span ID. |
To |
Returns a 32-character hexadecimal string that represents this trace ID. |
Equality(Activity |
Determines whether two specified ActivityTraceId instances have the same value. |
Inequality(Activity |
Determines whether two specified ActivityTraceId instances have the same value. |
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in