Table of Contents

Class ExecutionContext

Namespace
JD.AI.Core.Tracing
Assembly
JD.AI.Core.dll

Ambient execution context that flows through all operations via AsyncLocal<T>. Carries W3C trace IDs, session IDs, and turn metadata for end-to-end traceability.

public sealed class ExecutionContext
Inheritance
ExecutionContext
Inherited Members

Properties

Empty

Sentinel empty context.

public static ExecutionContext Empty { get; }

Property Value

ExecutionContext

ParentAgentId

Parent agent ID for multi-agent tracing.

public string? ParentAgentId { get; set; }

Property Value

string

ParentSpanId

Parent span ID for hierarchical tracing.

public string? ParentSpanId { get; set; }

Property Value

string

SessionId

Current session ID.

public string? SessionId { get; init; }

Property Value

string

SpanId

Current span ID (16 hex chars).

public string SpanId { get; set; }

Property Value

string

Timeline

The execution timeline recording all operations in this turn.

public ExecutionTimeline Timeline { get; }

Property Value

ExecutionTimeline

TraceId

W3C trace ID (32 hex chars).

public string TraceId { get; init; }

Property Value

string

TurnIndex

Current turn index.

public int TurnIndex { get; init; }

Property Value

int