# Call the tracked function
result = my_llm_application("What is the capital of France?")
print(result)
```

In this example, Opik will create a trace for the `my_llm_application` function, and all LlamaIndex operations (like the LLM chat call) will appear as nested spans within this trace, giving you a complete view of your application's execution.

## Using with Manual Trace Creation

You can also manually create traces using `opik.start_as_current_trace()` and have LlamaIndex operations nested within:

```python
import opik
from llama_index.core import global_handler, set_global_handler
from llama_index.llms.openai import OpenAI
from llama_index.core.llms import ChatMessage