[ENHANCEMENT] Auto-Instrumentation for OpenAI should be Disabled Off for Auto-Instrumentation for Langchain/Llamaindex #4070
Labels
enhancement
New feature or request
instrumentation
openinference instrumentations to various open-source projects
python
Pull requests that update Python code
stale
Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
We have a lot of instrumentations that use both Auto-Instrumentor for LangChain / Llama and OpenAI. I would like the OpenAI Auto Instrumentor to detect if its running in LangChain / LlamaIndex files. If so disable.
Possibly you could do this by using "inspect" library / looking if we called from LangChain file in frame.filename
# Check if the function is called from a specific file
for frame in inspect.stack():
filename = frame.filename
The text was updated successfully, but these errors were encountered: