-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
10.38
Framework Version
No response
Link to Sentry event
Reproduction Example/SDK Setup
The LangGraph docs ask you to pass null as the first argument to graph.invoke when resuming the graph from a checkpoint. See here: https://docs.langchain.com/oss/javascript/langgraph/use-functional-api#resuming-after-an-error
await main.invoke(null, config);However, @sentry/core incorrectly assumes that arg[0] is not-null, see here: https://github.com/getsentry/sentry-javascript/blob/develop/packages/core/src/tracing/langgraph/index.ts#L138.
// Parse input messages
const recordInputs = options.recordInputs;
const recordOutputs = options.recordOutputs;
const inputMessages =
args.length > 0 ? ((args[0] as { messages?: LangChainMessage[] }).messages ?? []) : [];This causes an error for resume on error, breaking the langgraph resume functionality, or force me to disable the langgraph API.
Steps to Reproduce
Attempt to resume a langgraph according to the docs main.invoke(null, config) with Sentry auto-instrumentation enabled.
Expected Result
No error on resume.
Actual Result
And error occurs.
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Projects
Status