> ## 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.

# get_current_trace_id()

> Return the active trace ID as hex string

## Overview

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

## Example

```python theme={"system"}
from keywordsai_tracing import get_client, workflow

@workflow(name="trace_demo")
def trace_demo():
    client = get_client()
    return client.get_current_trace_id()

print(trace_demo())
```
