class TracingInterceptor(temporalio.client.Interceptor, temporalio.worker.Interceptor): (source)
Constructor: TracingInterceptor(tracer)
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 |
Implementation of temporalio.worker.Interceptor.intercept_activity . |
Method | intercept |
Implementation of temporalio.client.Interceptor.intercept_client . |
Method | workflow |
Implementation of temporalio.worker.Interceptor.workflow_interceptor_class . |
Instance Variable | header |
Undocumented |
Instance Variable | payload |
Undocumented |
Instance Variable | text |
Undocumented |
Instance Variable | tracer |
Undocumented |
Method | _completed |
Undocumented |
Method | _context |
Undocumented |
Method | _context |
Undocumented |
Method | _start |
Undocumented |
Initialize a OpenTelemetry tracing interceptor.
Parameters | |
tracer:Optional[ | The tracer to use. Defaults to
opentelemetry.trace.get_tracer . |
temporalio.worker.ActivityInboundInterceptor
) -> temporalio.worker.ActivityInboundInterceptor
:
(source)
¶
Implementation of
temporalio.worker.Interceptor.intercept_activity
.
temporalio.client.OutboundInterceptor
) -> temporalio.client.OutboundInterceptor
:
(source)
¶
Implementation of
temporalio.client.Interceptor.intercept_client
.
temporalio.worker.WorkflowInterceptorClassInput
) -> Type[ TracingWorkflowInboundInterceptor]
:
(source)
¶
Implementation of
temporalio.worker.Interceptor.workflow_interceptor_class
.
_CompletedWorkflowSpanParams
) -> _CarrierDict
:
(source)
¶
Undocumented
Mapping[ str, temporalio.api.common.v1.Payload]
) -> Optional[ opentelemetry.context.context.Context]
:
(source)
¶
Undocumented
Mapping[ str, temporalio.api.common.v1.Payload]
) -> Mapping[ str, temporalio.api.common.v1.Payload]
:
(source)
¶
Undocumented
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