@@ -53,6 +53,7 @@ use hyperlight_guest_bin::host_comm::{
53
53
use hyperlight_guest_bin:: memory:: malloc;
54
54
use hyperlight_guest_bin:: { MIN_STACK_ADDRESS , guest_logger} ;
55
55
use log:: { LevelFilter , error} ;
56
+ use tracing:: { Span , instrument} ;
56
57
57
58
extern crate hyperlight_guest;
58
59
@@ -91,6 +92,7 @@ fn echo_float(function_call: &FunctionCall) -> Result<Vec<u8>> {
91
92
}
92
93
}
93
94
95
+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
94
96
fn print_output ( message : & str ) -> Result < Vec < u8 > > {
95
97
let res = call_host_function :: < i32 > (
96
98
"HostPrint" ,
@@ -101,6 +103,7 @@ fn print_output(message: &str) -> Result<Vec<u8>> {
101
103
Ok ( get_flatbuffer_result ( res) )
102
104
}
103
105
106
+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
104
107
fn simple_print_output ( function_call : & FunctionCall ) -> Result < Vec < u8 > > {
105
108
if let ParameterValue :: String ( message) = function_call. parameters . clone ( ) . unwrap ( ) [ 0 ] . clone ( ) {
106
109
print_output ( & message)
@@ -883,6 +886,7 @@ fn exec_mapped_buffer(function_call: &FunctionCall) -> Result<Vec<u8>> {
883
886
}
884
887
885
888
#[ no_mangle]
889
+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
886
890
pub extern "C" fn hyperlight_main ( ) {
887
891
let twenty_four_k_in_def = GuestFunctionDefinition :: new (
888
892
"24K_in_8K_out" . to_string ( ) ,
@@ -1593,6 +1597,7 @@ fn fuzz_host_function(func: FunctionCall) -> Result<Vec<u8>> {
1593
1597
}
1594
1598
1595
1599
#[ no_mangle]
1600
+ #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
1596
1601
pub fn guest_dispatch_function ( function_call : FunctionCall ) -> Result < Vec < u8 > > {
1597
1602
// This test checks the stack behavior of the input/output buffer
1598
1603
// by calling the host before serializing the function call.
0 commit comments