Skip to main content

Overview

get_context_value(key: str) -> Any

Example

from opentelemetry.semconv_ai import SpanAttributes
from keywordsai_tracing import workflow, get_client

@workflow(name="context_demo")
def context_demo():
    client = get_client()
    return client.get_context_value(SpanAttributes.TRACELOOP_ENTITY_NAME)

print(context_demo())