temporalio .contrib .openai_agents ._otel_trace_interceptor .OTelOpenAIAgentsContextPropagationInterceptor
temporaliocontribopenai_agents_otel_trace_interceptorOTelOpenAIAgentsContextPropagationInterceptor
class documentation
class OTelOpenAIAgentsContextPropagationInterceptor(OpenAIAgentsContextPropagationInterceptor): (source)
Constructor: OTelOpenAIAgentsContextPropagationInterceptor(otel_id_generator, payload_converter, add_temporal_spans)
OTEL-aware variant that enhances headers with OpenTelemetry span context.
| Method | __init__ |
Initialize OTEL-aware context propagation interceptor. |
| Method | context |
Extracts and initializes trace information the input header. |
| Method | header |
Get header contents enhanced with OpenTelemetry span context. |
| Instance Variable | _otel |
Undocumented |
Inherited from OpenAIAgentsContextPropagationInterceptor:
| Method | get |
Extract trace context information from input headers. |
| Method | intercept |
Intercepts activity calls to propagate trace context. |
| Method | intercept |
Intercepts client calls to propagate trace context. |
| Method | maybe |
Context manager that conditionally creates a span. |
| Method | set |
Inserts the OpenAI Agents trace/span data in the input header. |
| Method | span |
Initialize span context from header contents. |
| Method | trace |
Initialize trace context from header contents. |
| Method | workflow |
Returns the workflow interceptor class to propagate trace context. |
| Instance Variable | _add |
Undocumented |
| Instance Variable | _payload |
Undocumented |
| Instance Variable | _start |
Undocumented |
Inherited from Interceptor (via OpenAIAgentsContextPropagationInterceptor, Interceptor):
| Method | intercept |
Method called for intercepting a Nexus operation. |
def __init__(self, otel_id_generator:
TemporalIdGenerator, payload_converter: temporalio.converter.PayloadConverter = temporalio.converter.default().payload_converter, add_temporal_spans: bool = True):
(source)
¶
Initialize OTEL-aware context propagation interceptor.
| Parameters | |
otelTemporalIdGenerator | Generator for OTEL-compatible IDs. |
payloadtemporalio.converter.PayloadConverter | Converter for serializing trace context. |
addbool | Whether to add Temporal-specific spans. |