Open arthurbrenno opened 2 months ago
Hi @arthurbrenno sorry you are facing issues. At first glance I'm not 100% sure what's wrong. Could you try using https://github.com/Arize-ai/openinference/tree/main/python/instrumentation/openinference-instrumentation-llama-index directly?
The errors seem very odd. Will dig in a bit more with the team.
I (seem) have the similiar problem when trying to use a local Phoenix with LLAMAIndex directly spawned side-by-side via Python.
The Phoenix is spawned within the same application which also spawns itself an FastAPI. I register the Instrumentor for both, the main process and the FastAPI spawned sub/mp process without any errors.
Nothing is logged, no call to /v1/traces seems gets fired/logged. Tried everything, also the mentioned fully-manual OpenInference SDK approach via the LlamaIndexInstrumentor.
main.py
import llama_index.core
import nest_asyncio
import phoenix as px
import uvicorn
# Always register phoenix handler
llama_index.core.set_global_handler("arize_phoenix")
if __name__ == "__main__":
px.launch_app(use_temp_dir=False)
uvicorn.run(
app="api:app",
host="0.0.0.0",
port=8000,
reload=True,
reload_includes=["../*.yaml"],
loop="asyncio", # Fix some api internal stuff with LLM/Workflows
)
nest_asyncio.apply() # Fix some api internal stuff with LLM/Workflows
elif __name__ != "__mp_main__":
pass
SideNote: The nest_asyncio and loop-asyncio on/for my application does not interfere with phoenix, as I tried without and it also did not work.
Last Known Good Versions (where it last worked in a current prod like deployment): Phoenix 5.6.0, LLAMAIndex 0.10.67.post1, openinference-instrumentation 0.1.15, openinference-instrumentation-llama-index 2.2.4, llama-index-callbacks-arize-phoenix 0.1.6
Describe the bug Im using a self-hosted phoenix version and playing around with some API requests. My traces are not beeing registered in localhost:6006.
To Reproduce Steps to reproduce the behavior:
Create a docker-compose:
volumes: phoenix_data: driver: local # Persistent volume for Phoenix data postgres_data: driver: local # Persistent volume for PostgreSQL data
tracer_provider = register( project_name="default", endpoint="http://localhost:6006/v1/traces", )
LlamaIndexInstrumentor().instrument(tracer_provider=tracer_provider)