File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed
src/uipath_langchain/tracers Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,24 @@ def dispatch_trace_event(
3232 metadata : Optional [Dict [str , Any ]] = None ,
3333):
3434 """Dispatch trace event to our server."""
35+ try :
36+ event_data = FunctionCallEventData (
37+ function_name = func_name ,
38+ event_type = event_type ,
39+ inputs = inputs ,
40+ call_uuid = call_uuid ,
41+ output = result ,
42+ error = str (exception ) if exception else None ,
43+ run_type = run_type ,
44+ tags = tags ,
45+ metadata = metadata ,
46+ )
3547
36- event_data = FunctionCallEventData (
37- function_name = func_name ,
38- event_type = event_type ,
39- inputs = inputs ,
40- call_uuid = call_uuid ,
41- output = result ,
42- error = str (exception ) if exception else None ,
43- run_type = run_type ,
44- tags = tags ,
45- metadata = metadata ,
46- )
47- dispatch_custom_event (CustomTraceEvents .UIPATH_TRACE_FUNCTION_CALL , event_data )
48+ dispatch_custom_event (CustomTraceEvents .UIPATH_TRACE_FUNCTION_CALL , event_data )
49+ except Exception as e :
50+ logger .debug (
51+ f"Error dispatching trace event: { e } . Function name: { func_name } Event type: { event_type } "
52+ )
4853
4954
5055def format_args_for_trace (
You can’t perform that action at this time.
0 commit comments