Skip to main content

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

Returns the current span ID or None when no span is active.

Example

from keywordsai_tracing import get_client, task

@task(name="span_demo")
def span_demo():
    client = get_client()
    return client.get_current_span_id()

print(span_demo())