Contains static methods that are safe to call from within a workflow.
Using any other opentelemetry API could cause non-determinism.
str, *, attributes:
opentelemetry.util.types.Attributes= None, exception:
Optional[= 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.
|name:||Name of the span.|
|attributes:||Attributes to set on the span if any. Workflow ID and run ID are automatically added.|
|exception:||Optional exception to record on the span.|