public sealed class SimpleTraceContext : ITraceContext
Simple implementation of ITraceContext.
Implements
ITraceContextNamespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Constructors
SimpleTraceContext(String, Nullable<UInt64>, Nullable<Boolean>)
public SimpleTraceContext(string traceId, ulong? spanId, bool? shouldTrace)
Creates a new instance of SimpleTraceContext.
Parameters | |
---|---|
Name | Description |
traceId | String |
spanId | Nullable<UInt64> |
shouldTrace | Nullable<Boolean> |
Properties
ShouldTrace
public bool? ShouldTrace { get; }
Whether this request should be traced or not. May be null, which means that there's not enough information to know whether this request should be traced or not.
Property Value | |
---|---|
Type | Description |
Nullable<Boolean> |
SpanId
public ulong? SpanId { get; }
The span id or null if none is available.
Property Value | |
---|---|
Type | Description |
Nullable<UInt64> |
This corresponds to the span_id field of the TraceSpan message in the API. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v1#tracespan for more information.
TraceId
public string TraceId { get; }
The trace id or null if none is available.
Property Value | |
---|---|
Type | Description |
String |
This corresponds to the trace_id field of the Trace message in the API. See https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v1#trace for more information.