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

# add_event()

> Add an event to the current span

## Overview

```python theme={"system"}
add_event(name: str, attributes: Dict = None, timestamp: int = None) -> bool
```

## Example

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

@task(name="compute")
def compute():
    client = get_client()
    client.add_event("compute_started", {"records": 42})
    return 1 + 1

print(compute())
```
