faust.utils.tracing

OpenTracing utilities.

faust.utils.tracing.current_span() Optional[Span][source]

Get the current span for this context (if any).

Return type:

_UnionGenericAlias[Span, None]

faust.utils.tracing.noop_span() Span[source]

Return a span that does nothing when traced.

Return type:

Span

faust.utils.tracing.set_current_span(span: Span) None[source]

Set the current span for the current context.

Return type:

None

faust.utils.tracing.finish_span(span: Optional[Span], *, error: Optional[BaseException] = None) None[source]

Finish span, and optionally set error tag.

Return type:

None

faust.utils.tracing.operation_name_from_fun(fun: Any) str[source]

Generate opentracing name from function.

Return type:

str

faust.utils.tracing.traced_from_parent_span(parent_span: Optional[Span] = None, callback: Optional[Callable] = None, **extra_context: Any) Callable[source]

Decorate function to be traced from parent span.

Return type:

_CallableType

faust.utils.tracing.call_with_trace(span: Span, fun: Callable, callback: Optional[Tuple[Callable, Tuple[Any, ...]]], *args: Any, **kwargs: Any) Any[source]

Call function and trace it from parent span.

Return type:

Any