LangChain finishes incomplete status on LangSmith

Hi, I created LangChain and connected to LangSmith.

Honestly, I’ve done with the vibe coding, don’t know much about the deep structure.

If I try to analyze using LangChain and send it to LangSmith, it gathers well on LangSmith. However, it never finishes, and fall into incomplete status at the end.

There are not useful logs that I can have a look into for this errors.

What can be general issues which can cause this problem?

Here’s the code snippet when I send it to LangSmith

langsmith_manager.log_llm_call(
model=self.chat_model,
prompt=f"프롬프트: {system_prompt[:100]}…",
response=result_text,
metadata={
“function”: “refine_memo”,
“memo_length”: len(memo),
“response_length”: len(result_text),
“response_time_ms”: response_time_ms,
“use_dynamic_prompts”: self.use_dynamic_prompts
}
)

Can anybody give me any comments to fix this issue?

1 Like

Facing same issue occasionally.

Same issue, anyone can help?

The issue could be because you are not properly closing traces.

You can try do the following. Set end_time on runs or call client.flush() before app exits.

Another option could be using another tracing method since there are several ways to logs traces to langsmith for example decorating your function

Kinldy check the docs for more: