Skip to content

No mechanism on MCP and LangChain exceptions #5242

Description

Errors captured by automatic instrumentation should have a mechanism so capture data is available, and the popularity of integrations can be determined.
See

except Exception as e:
# Set error flag for tools
if handler_type == "tool":
span.set_data(SPANDATA.MCP_TOOL_RESULT_IS_ERROR, True)
sentry_sdk.capture_exception(e)
raise

and

def _handle_error(self, run_id: "UUID", error: "Any") -> None:
with capture_internal_exceptions():
if not run_id or run_id not in self.span_map:
return
span_data = self.span_map[run_id]
span = span_data.span
set_span_errored(span)
sentry_sdk.capture_exception(error, span.scope)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions