How to prevent LangGraph GraphInterrupt from flagging tracing spans as errors?
#13677
Replies: 2 comments
-
|
Hi @aliaksandrzakreuski! I'm Dosu and I'm helping the Arize team. The IGNORED_EXCEPTION_PATTERNS = [
r"^Command\(",
r"^ParentCommand\(",
]Currently, this list covers Workarounds for now:
This seems like a valid candidate for an upstream fix — adding To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
-
|
You can use the from openinference.instrumentation.langchain import LangchainInstrumentation
instrumentation = LangchainInstrumentation(
error_filter=lambda exc_type, exc_value, traceback: exc_type is not GraphInterrupt
)This configuration allows you to specify exceptions that should not be treated as errors in OpenTelemetry spans. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
We are using LangGraph's native interrupt()feature for human-in-the-loop workflows (such as user verification and suggestion choices), while monitoring our application using Arize Phoenix via openinference-instrumentation-langchain.
LangGraph uses the GraphInterruptexception as an expected control-flow mechanism to cleanly pause graph execution and save state checkpoints. However, the OpenInference instrumentation captures this escaping exception as a fatal application crash, force-setting the OpenTelemetry span status to ERROR.
Is there an idiomatic or supported way within Phoenix/OpenInference to filter out GraphInterruptfrom being logged as an error?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions