class documentation

class workflow: (source)

View In Hierarchy

Contains static methods that are safe to call from within a workflow.

Warning

Using any other opentelemetry API could cause non-determinism.

Static Method completed_span Create and end an OpenTelemetry span.
Method __init__ Undocumented
@staticmethod
def completed_span(name: str, *, attributes: opentelemetry.util.types.Attributes = None, exception: Optional[Exception] = None): (source)

Create and end an OpenTelemetry span.

Note, this will only create and record when the workflow is not replaying and if there is a current span (meaning the client started a span and this interceptor is configured on the worker and the span is on the context).

There is currently no way to create a long-running span or to create a span that actually spans other code.

Parameters
name:strName of the span.
attributes:opentelemetry.util.types.AttributesAttributes to set on the span if any. Workflow ID and run ID are automatically added.
exception:Optional[Exception]Optional exception to record on the span.
def __init__(self): (source)

Undocumented