Skip to content

Commit

Permalink
Trace Roto VM execution failures too.
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 committed Oct 25, 2023
1 parent 5468031 commit 4b39121
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/common/roto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,12 @@ impl RotoScripts {
let res = stateful_vm
.vm
.exec(rx, tx, filter_map_args, &mut stateful_vm.mem)
.map_err(|err| RotoError::exec_err(&stateful_vm.filter_name, err))?;
.map_err(|err| {
if let Some((tracer, trace_id)) = &trace_details {
tracer.note_event(*trace_id, format!("Filtering failed: {err:#?}"));
}
RotoError::exec_err(&stateful_vm.filter_name, err)
})?;

if let Some((tracer, trace_id)) = &trace_details {
tracer.note_event(*trace_id, format!("Filtering result: {res:#?}"));
Expand Down

0 comments on commit 4b39121

Please sign in to comment.