You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gives me proper langfuse tracing in the langfuse dashboard, but what also happens is that I get A LOT of errors originating from langchain.py, specifically its on_chain_start and on_chain_end callbacks. Like this:
Traceback (most recent call last):
File "....../.venv/lib/python3.12/site-packages/langfuse/callback/langchain.py", line 273, in on_chain_start
self.runs[run_id] = self.runs[parent_run_id].span(**content)
~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: UUID('402ae73d-c6ab-4a0d-a664-cb41a40712a5')
Traceback (most recent call last):
File "....../.venv/lib/python3.12/site-packages/langfuse/callback/langchain.py", line 273, in on_chain_start
self.runs[run_id] = self.runs[parent_run_id].span(**content)
~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: UUID('4c849e11-045c-4a9b-9c98-76299d9feace')
Traceback (most recent call last):
File "....../.venv/lib/python3.12/site-packages/langfuse/callback/langchain.py", line 459, in on_chain_end
raise Exception("run not found")
Exception: run not found
Traceback (most recent call last):
File "....../.venv/lib/python3.12/site-packages/langfuse/callback/langchain.py", line 459, in on_chain_end
raise Exception("run not found")
Exception: run not found
Traceback (most recent call last):
File "....../.venv/lib/python3.12/site-packages/langfuse/callback/langchain.py", line 459, in on_chain_end
raise Exception("run not found")
Exception: run not found
I thought that this happens because of an error with callback propagation, but I thought with_config is there specifically so I don't have to do it manually.
### Description
I am trying to implement Langfuse tracing for my Langcserve http handler chains.
Additional info is above the code blocks that its related to, above in the Example Code section.
### System Info
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Here is the llm_model and get_llm in llms.py:
This gives me proper langfuse tracing in the langfuse dashboard, but what also happens is that I get A LOT of errors originating from
langchain.py
, specifically itson_chain_start
andon_chain_end
callbacks. Like this:I thought that this happens because of an error with callback propagation, but I thought
with_config
is there specifically so I don't have to do it manually.langchain==0.3.14
langchain-cli==0.0.31
langchain-community==0.3.14
langchain-core==0.3.29
langchain-google-genai==2.0.7
langchain-google-vertexai==2.0.9
langchain-openai==0.2.0
langchain-text-splitters==0.3.5
langfuse==2.57.12
Beta Was this translation helpful? Give feedback.
All reactions