class documentation
class workflow: (source)
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 |
Create and end an OpenTelemetry span. |
Method | __init__ |
Undocumented |
@staticmethod
def completed_span(name:
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:str | Name of the span. |
attributes:opentelemetry.util.types.Attributes | Attributes to set on the span if any. Workflow ID and run ID are automatically added. |
exception:Optional[ | Optional exception to record on the span. |