Skip to main content

Overview

Use respan_span_attributes(params) to attach Respan attributes (including metadata) to the active span.

Example

from respan_tracing.contexts.span import respan_span_attributes
from respan_tracing import workflow

@workflow(name="annotate")
def annotate():
    with respan_span_attributes({
        "customer_identifier": "cust-1",
        "trace_group_identifier": "grp-a",
        "metadata": {"team": "search"}
    }):
        return "ok"

print(annotate())