Class TraceContextState

java.lang.Object
ai.acolite.agentsdk.core.tracing.TraceContextState

public class TraceContextState extends Object
TraceContextState

Holds the current trace and span state for a thread. Used by TraceContext for ThreadLocal storage.

This class is mutable to allow updating the current span as execution progresses through nested spans.

Source: https://github.com/openai/openai-agents-js/blob/main/packages/agents-core/src/tracing/context.ts

  • Constructor Details

    • TraceContextState

      public TraceContextState(Trace trace)
  • Method Details

    • copy

      public TraceContextState copy()
      Create a copy of this state for propagation to another thread