From b8ab0982cd941a5d48540bf483f6003dc54a716a Mon Sep 17 00:00:00 2001 From: akash-vijay-kv Date: Fri, 3 Jul 2026 15:59:05 +0530 Subject: [PATCH] [NET-920] fix: Add missing escaped param in record_exception() --- netra/__init__.py | 3 ++- netra/session_manager.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/netra/__init__.py b/netra/__init__.py index 5ced2017..ec21ebf5 100644 --- a/netra/__init__.py +++ b/netra/__init__.py @@ -420,6 +420,7 @@ def record_exception( cls, exception: BaseException, attributes: Optional[Dict[str, Any]] = None, + escaped: Optional[bool] = False, ) -> None: """Record a caught exception on the currently active span. @@ -454,7 +455,7 @@ def process_order(order_id: str) -> str: type(exception), ) return - SessionManager.record_exception(exception, attributes=attributes) + SessionManager.record_exception(exception, attributes=attributes, escaped=escaped) @classmethod def add_conversation(cls, conversation_type: ConversationType, role: str, content: Any) -> None: diff --git a/netra/session_manager.py b/netra/session_manager.py index 62543279..db8bdc14 100644 --- a/netra/session_manager.py +++ b/netra/session_manager.py @@ -520,6 +520,7 @@ def set_attribute_on_root_span(cls, attr_key: str, attr_value: Any) -> None: def record_exception( exception: BaseException, attributes: Optional[Dict[str, Any]] = None, + escaped: Optional[bool] = False, ) -> None: """Record a caught exception on the currently active span. @@ -539,7 +540,7 @@ def record_exception( logger.warning("record_exception: no active recording span to record exception on") return - span.record_exception(exception, attributes=attributes) + span.record_exception(exception, attributes=attributes, escaped=escaped) span.set_status(trace.Status(trace.StatusCode.ERROR, str(exception))) span.set_attribute(f"{Config.LIBRARY_NAME}.error_message", str(exception)) except Exception: