@@ -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)
@@ -919,6 +922,7 @@ fn call_host_expect_error(function_call: &FunctionCall) -> Result<Vec<u8>> {
919922}
920923
921924#[ no_mangle]
925+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
922926pub extern "C" fn hyperlight_main ( ) {
923927 let expect_error_def = GuestFunctionDefinition :: new (
924928 "CallHostExpectError" . to_string ( ) ,
@@ -1640,6 +1644,7 @@ fn fuzz_host_function(func: FunctionCall) -> Result<Vec<u8>> {
16401644}
16411645
16421646#[ no_mangle]
1647+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
16431648pub fn guest_dispatch_function ( function_call : FunctionCall ) -> Result < Vec < u8 > > {
16441649 // This test checks the stack behavior of the input/output buffer
16451650 // by calling the host before serializing the function call.
0 commit comments