Troubleshooting LLM Call Tracing in Flask with Phoenix and LangChain
Hello, team! I am trying to trace the LLM calls using phoenix in my flask application which uses langchain and deployed as a container in kubernetes, I have deployed phoenix as a container in the same kubernetes cluster. When I start the flask application it is not tracing any calls but the same code is working while running in a notebook, all the traces are pushed to the phoenix server deployed in kubernetes. Anything I鈥檓 missing here when running as a flask application ?
import phoenix as px
from phoenix.trace.langchain import LangChainInstrumentor
os.environ['PHOENIX_COLLECTOR_ENDPOINT'] = "http://<phoenix_host>:<phoenix_port>" #Load Balancer endpoint in kubernetes container
session = px.launch_app()
app = Flask(__name__)
LangChainInstrumentor().instrument()
if __name__ == "__main__":
app.run()