Hello there!
I am not sure if this is right category for my question, but have not found any more suitable.
I am trying to trace strictly timed gameplay parts for further analysis. As expected result, I want to see strict trace in Insights from Trace.Start to Trace.Stop.
But now I see that Unreal Engine(5.2 in my case) placing some excess data before Trace.Start command is actually executed.
Test setup: new blank project with two trigger volumes in it - one for start tracing and one for stop.
All logic inside Level blueprint: OnBeginPlay checking if tracing active(Is Tracing) and, if True - stop tracing.
Then simple trigger logic to start/stop tracing when overlapping related triggers. Also added trace bookmarks to visual debugging.
Running as Standalone Game. Before start, ended UnrealTraceServer.exe process in Task Manager(just in case).
As you can see on screenshot below, there is over than 36 seconds of excessive data on start before actually trace start executed(there is bookmark).
Could someone please help me with this question? Is this ever possible to capture only(and only) data that I want?
You can see blueprint logic on next screenshot:
By default, tracing uses a tail buffer (32 MiB in Editor and 4 MiB in game). If tracing is enabled (at compile time) then tracing is always on. The emitted trace events (filtered by enabled channels) are stored, in memory, in this tail buffer. When trace is started (i.e. connected to a trace sink, like sending data to UnrealTraceServer or start writing to a file) the tail buffer will be sent first and then will continue with normal tracing (new trace events are stored both in the tail buffer and sent to the connection). So, in general, you have a recent history of what was tracing before the trace connection is started.
This feature is also used by the “trace snapshot“ functionality: ability to quickly create a short trace session – i.e. a trace snapshot – only with this recent history. A trace snapshot can be saved at any point in time, no matter if trace is connected or not.
The tail buffer can be customized (or disabled) using -tracetailmb=N command line parameter (N specifies the size of the trace tail buffer, in MiB) .
Programmatically, it is also possible to disable the tail buffer, when starting a new connection, using: