Open G4Vi opened 11 months ago
I think this is because of observe.Options.SpanFilter.MinDuration
, by default it's 20µs
, so if wazero executes the function in less than that, it will be skipped. I was able to get deterministic results by setting the limit to 1ns
:
trace, err = adapterBase.NewTraceCtx(ctx, c.Wazero, data.Data, &observe.Options{
SpanFilter: &observe.SpanFilter{MinDuration: 1 * time.Nanosecond},
ChannelBufferSize: 1024,
I think it's most likely what @mhmd-azeez points out.
But worth some additional investigation. I'll look more closely at the results @G4Vi posted asap.
Running the stdout adapter on
../test/nested.instr.wasm
can yield varying results. No triage has been done to determine if it occurs with the other adapters.One run:
Another run:
In the second trace
__imported_wasi_snapshot_preview1_fd_write
shows up which wasn't in the first. However, then__wasm_call_dtors
doesn't show up which was in the first trace.