Table of Contents

Class TraceContext

Namespace
DotCompute.Abstractions.Telemetry.Context
Assembly
DotCompute.Abstractions.dll

Represents the context for a distributed trace, containing trace metadata, spans, and device operation information.

public sealed class TraceContext
Inheritance
TraceContext
Inherited Members

Properties

Activity

Gets or sets the Activity associated with this trace context. Provides integration with .NET's built-in activity tracing.

public Activity? Activity { get; set; }

Property Value

Activity

The Activity instance or null if not available.

CorrelationId

Gets or sets the correlation identifier for this trace. Used for correlating related operations within the same trace.

public string CorrelationId { get; set; }

Property Value

string

The correlation identifier as a string.

OperationName

Gets or sets the name of the root operation for this trace. Typically represents the high-level operation being traced.

public string OperationName { get; set; }

Property Value

string

The operation name as a string.

StartTime

Gets or sets the timestamp when the trace started. Used for calculating total trace duration and timeline analysis.

public DateTimeOffset StartTime { get; set; }

Property Value

DateTimeOffset

The start time as a DateTimeOffset.

Tags

Gets or sets the tags associated with this trace. Tags are key-value pairs that provide additional metadata about the trace.

public Dictionary<string, object?> Tags { get; }

Property Value

Dictionary<string, object>

A dictionary of tag key-value pairs.

TraceId

Gets or sets the unique trace identifier. This ID is used to correlate spans across service boundaries.

public string TraceId { get; set; }

Property Value

string

The trace identifier as a string.