@@ -53,6 +53,7 @@ use hyperlight_guest_bin::host_comm::{
5353use hyperlight_guest_bin:: memory:: malloc;
5454use hyperlight_guest_bin:: { MIN_STACK_ADDRESS , guest_logger} ;
5555use log:: { LevelFilter , error} ;
56+ use tracing:: { Span , instrument} ;
5657
5758extern crate hyperlight_guest;
5859
@@ -91,6 +92,7 @@ fn echo_float(function_call: &FunctionCall) -> Result<Vec<u8>> {
9192 }
9293}
9394
95+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
9496fn print_output ( message : & str ) -> Result < Vec < u8 > > {
9597 let res = call_host_function :: < i32 > (
9698 "HostPrint" ,
@@ -101,6 +103,7 @@ fn print_output(message: &str) -> Result<Vec<u8>> {
101103 Ok ( get_flatbuffer_result ( res) )
102104}
103105
106+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
104107fn simple_print_output ( function_call : & FunctionCall ) -> Result < Vec < u8 > > {
105108 if let ParameterValue :: String ( message) = function_call. parameters . clone ( ) . unwrap ( ) [ 0 ] . clone ( ) {
106109 print_output ( & message)
@@ -891,6 +894,7 @@ fn exec_mapped_buffer(function_call: &FunctionCall) -> Result<Vec<u8>> {
891894}
892895
893896#[ no_mangle]
897+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
894898pub extern "C" fn hyperlight_main ( ) {
895899 let twenty_four_k_in_def = GuestFunctionDefinition :: new (
896900 "24K_in_8K_out" . to_string ( ) ,
@@ -1604,6 +1608,7 @@ fn fuzz_host_function(func: FunctionCall) -> Result<Vec<u8>> {
16041608}
16051609
16061610#[ no_mangle]
1611+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
16071612pub fn guest_dispatch_function ( function_call : FunctionCall ) -> Result < Vec < u8 > > {
16081613 // This test checks the stack behavior of the input/output buffer
16091614 // by calling the host before serializing the function call.
0 commit comments