Class TraceContext
Ambient AsyncLocal<T> holder for the current ExecutionContext.
public static class TraceContext
- Inheritance
-
TraceContext
- Inherited Members
Properties
CurrentContext
Gets or sets the current execution context for this async flow.
public static ExecutionContext CurrentContext { get; set; }
Property Value
Methods
StartChildSpan()
Creates a child span under the current context. Allocates a new ExecutionContext so each async flow gets its own span state — avoids the read-modify-write race on the shared mutable object.
public static string StartChildSpan()
Returns
StartTurn(string?, int)
Starts a new trace for a user turn, setting the ambient context.
public static ExecutionContext StartTurn(string? sessionId, int turnIndex)