module documentation

Adds OpenAI Agents traces and spans to Temporal workflows and activities.

Class OpenAIAgentsTracingInterceptor Interceptor that propagates OpenAI agent tracing context through Temporal workflows and activities.
Class RunIdRandom Random uuid generator seeded by the run id of the workflow. Doesn't currently support replay over reset correctly.
Function context_from_header Extracts and initializes trace information the input header.
Function set_header_from_context Inserts the OpenAI Agents trace/span data in the input header.
Constant HEADER_KEY Undocumented
Class _ContextPropagationActivityInboundInterceptor Undocumented
Class _ContextPropagationClientOutboundInterceptor Undocumented
Class _ContextPropagationWorkflowInboundInterceptor Undocumented
Class _ContextPropagationWorkflowOutboundInterceptor Undocumented
Class _InputWithHeaders Undocumented
Function _ensure_tracing_random We use a custom uuid generator for spans to ensure that changes to user code workflow.random usage do not affect tracing and vice versa.
@contextmanager
def context_from_header(span_name: str, input: _InputWithHeaders, payload_converter: temporalio.converter.PayloadConverter): (source)

Extracts and initializes trace information the input header.

def set_header_from_context(input: _InputWithHeaders, payload_converter: temporalio.converter.PayloadConverter): (source)

Inserts the OpenAI Agents trace/span data in the input header.

HEADER_KEY: str = (source)

Undocumented

Value
'__openai_span'
def _ensure_tracing_random(): (source)

We use a custom uuid generator for spans to ensure that changes to user code workflow.random usage do not affect tracing and vice versa.