Documentation Index
Fetch the complete documentation index at: https://docs.keywordsai.co/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use keywordsai_span_attributes(params) to attach KeywordsAI attributes (including metadata) to the active span.
Example
from keywordsai_tracing.contexts.span import keywordsai_span_attributes
from keywordsai_tracing import workflow
@workflow(name="annotate")
def annotate():
with keywordsai_span_attributes({
"customer_identifier": "cust-1",
"trace_group_identifier": "grp-a",
"metadata": {"team": "search"}
}):
return "ok"
print(annotate())