langtrace_op.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your Langtrace and OpenAI API keys
4
Save and fix the initialization order
Save the code above as
langtrace_op.py, then move the langtrace_python_sdk import and langtrace.init() before every Agno and OpenAI import.5
Run the example
Run the corrected file: