class documentation
class Interceptor: (source)
Known subclasses: temporalio.contrib.opentelemetry.TracingInterceptor
, temporalio.testing._workflow._AssertionErrorInterceptor
Interceptor for workers.
This should be extended by any worker interceptors.
Method | intercept |
Method called for intercepting an activity. |
Method | workflow |
Class that will be instantiated and used to intercept workflows. |
def intercept_activity(self, next:
ActivityInboundInterceptor
) -> ActivityInboundInterceptor
:
(source)
¶
overridden in
temporalio.contrib.opentelemetry.TracingInterceptor
Method called for intercepting an activity.
Parameters | |
next:ActivityInboundInterceptor | The underlying inbound interceptor this interceptor should delegate to. |
Returns | |
ActivityInboundInterceptor | The new interceptor that will be used to for the activity. |
def workflow_interceptor_class(self, input:
WorkflowInterceptorClassInput
) -> Optional[ Type[ WorkflowInboundInterceptor]]
:
(source)
¶
overridden in
temporalio.contrib.opentelemetry.TracingInterceptor
, temporalio.testing._workflow._AssertionErrorInterceptor
Class that will be instantiated and used to intercept workflows.
This method is called on workflow start. The class must have the same
init as WorkflowInboundInterceptor.__init__
. The input can be
altered to do things like add additional extern functions.
Parameters | |
input:WorkflowInterceptorClassInput | Input to this method that contains mutable properties that can be altered by this interceptor. |
Returns | |
Optional[ | The class to construct to intercept each workflow. |