class documentation

Interceptor that supports client and worker OpenTelemetry span creation and propagation.

This should be created and used for interceptors on the temporalio.client.Client.connect call to apply to all client calls and worker calls using that client. To only apply to workers, set as worker creation option instead of in client.

To customize the header key, text map propagator, or payload converter, a subclass of this and TracingWorkflowInboundInterceptor should be created. In addition to customizing those attributes, the subclass of this class should return the workflow interceptor subclass from workflow_interceptor_class. That subclass should also set the custom attributes desired.

Method __init__ Initialize a OpenTelemetry tracing interceptor.
Method intercept_activity Implementation of temporalio.worker.Interceptor.intercept_activity.
Method intercept_client Implementation of temporalio.client.Interceptor.intercept_client.
Method workflow_interceptor_class Implementation of temporalio.worker.Interceptor.workflow_interceptor_class.
Instance Variable header_key Undocumented
Instance Variable payload_converter Undocumented
Instance Variable text_map_propagator Undocumented
Instance Variable tracer Undocumented
Method _completed_workflow_span Undocumented
Method _context_from_headers Undocumented
Method _context_to_headers Undocumented
Method _start_as_current_span Undocumented

Initialize a OpenTelemetry tracing interceptor.

Parameters
tracer:Optional[opentelemetry.trace.Tracer]The tracer to use. Defaults to opentelemetry.trace.get_tracer.
header_key: str = (source)

Undocumented

payload_converter = (source)

Undocumented

Undocumented

def _completed_workflow_span(self, params: _CompletedWorkflowSpanParams) -> _CarrierDict: (source)

Undocumented

@contextmanager
def _start_as_current_span(self, name: str, *, attributes: opentelemetry.util.types.Attributes, input: Optional[_InputWithHeaders] = None, kind: opentelemetry.trace.SpanKind) -> Iterator[None]: (source)

Undocumented