[Obsolete("Use Google.Cloud.Diagnostics.Common.ITraceContext instead.")]public sealed class TraceContextForLogEntry
Represents a trace context (Trace ID and Span ID)
for a log entry.
These values can be attached to a log entry to establish the
relation of it and a trace.
For this to be matched to a span being stored in Google Cloud Trace,
its format should be the same that the Trace API v2 uses: a 16-character hexadecimal
encoding of an 8-byte array, such as 000000000000004a. A check is not performed
to ensure this format is used, so as to allow for this value to refer to spans other
than those stored in Google Cloud Trace.
TraceId
public string TraceId { get; }
The trace ID to associate the log entry with.
Must not be null.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["`TraceContextForLogEntry` represents a trace context, comprised of a Trace ID and Span ID, used to link log entries with specific traces."],["The latest version of the `TraceContextForLogEntry` documentation is 5.2.0, with versions as far back as 4.3.1 being available for reference."],["The `TraceId` property, which is a required string, designates the trace ID to connect with a given log entry."],["The `SpanId` property, a string that can be null, represents the span ID and should be formatted as a 16-character hexadecimal encoding to match Google Cloud Trace API v2 standards, but it can reference spans outside of it."],["Constructors are available to create `TraceContextForLogEntry` objects using a trace ID and a span ID, both string types, where the trace ID is mandatory, and span ID is optional."]]],[]]