@@ -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)
@@ -883,6 +886,7 @@ fn exec_mapped_buffer(function_call: &FunctionCall) -> Result<Vec<u8>> {
883886}
884887
885888#[ no_mangle]
889+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
886890pub extern "C" fn hyperlight_main ( ) {
887891 let twenty_four_k_in_def = GuestFunctionDefinition :: new (
888892 "24K_in_8K_out" . to_string ( ) ,
@@ -1593,6 +1597,7 @@ fn fuzz_host_function(func: FunctionCall) -> Result<Vec<u8>> {
15931597}
15941598
15951599#[ no_mangle]
1600+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
15961601pub fn guest_dispatch_function ( function_call : FunctionCall ) -> Result < Vec < u8 > > {
15971602 // This test checks the stack behavior of the input/output buffer
15981603 // by calling the host before serializing the function call.
0 commit comments