Skip to content

Commit 087f6f9

Browse files
committed
[Rust] Session scoped relocation handler logs
Assign the `session_id` span field before calling into the relocation handler so logs get scoped to the specific view.
1 parent 9717943 commit 087f6f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/src/relocation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ where
442442
.iter()
443443
.map(RelocationInfo::from_raw)
444444
.collect::<Vec<_>>();
445+
let _span = ffi_span!("RelocationHandler::get_relocation_info", bv);
445446
let ok =
446447
custom_handler.get_relocation_info(bv.as_ref(), arch.as_ref(), info.as_mut_slice());
447448
for (result, info) in result.iter_mut().zip(info.iter()) {
@@ -466,6 +467,7 @@ where
466467
let arch = unsafe { CoreArchitecture::from_raw(arch) };
467468
let reloc = unsafe { Relocation::from_raw(reloc) };
468469
let dest = unsafe { core::slice::from_raw_parts_mut(dest, len) };
470+
let _span = ffi_span!("RelocationHandler::apply_relocation", bv);
469471
custom_handler.apply_relocation(bv.as_ref(), arch.as_ref(), &reloc, dest)
470472
}
471473

0 commit comments

Comments
 (0)