Hello,
In UE 5.4 we had tracing enabled on our shipping servers. We used it on production to be able to collect periodically performance data in trace file. In UE5.5, the build is failing on
static_assert(!TRACE_PRIVATE_FULL_ENABLED, “Full tracing in shipping is not supported.”);
static_assert(UE_TRACE_MINIMAL_ENABLED == 0 || UE_TRACE_ENABLED_SHIPPING_EXPERIMENTAL, “Minimal trace in shipping is currently experimental”);
added in https://github.com/EpicGames/UnrealEngine/commit/24bc4f8fc81d2d0289864a1a7b7f30a835aebcd7
We commented out asserts as engine mod what revelated that we also had to modify MetasoundTrace.h #if from
#if METASOUND_CPUPROFILERTRACE_ENABLED
to
#if METASOUND_CPUPROFILERTRACE_ENABLED && ENABLE_NAMED_EVENTS
and we are now able to again collect traces from Shipping just fine.
Does this strict assert really need to exist? It would be also good for METASOUND_CPUPROFILERTRACE_ENABLED to be properly driven by ENABLE_NAMED_EVENTS.
In UE 5.4 we had tracing enabled on our shipping servers. We used it on production to be able to collect periodically performance data in trace file.
That’s cool to hear. Trace was always designed with development configurations in mind. With 5.5 we’re taking some steps to enable tracing in shipping products but as you noted this support is experimental. Part of that work is to reset what instrumentation is enabled in shipping configuration. This is to make sure to never unintentionally expose instrumentation only meant for development.
This is the reason we explictly warn about enabling “full” tracing for shipping, and notify users this is not supported behaviour. For servers this might be a lesser risk, and you are of course free to enable this and remove the assert.
Are you using the socket control to trigger tracing? If not I would recommend disable that by setting UE_TRACE_ALLOW_TCP_CONTROL=0.
It would be also good for METASOUND_CPUPROFILERTRACE_ENABLED to be properly driven by ENABLE_NAMED_EVENTS.
Sure, I can make that change.
Thank you Johan for the reply. That is understandable, I hope going forward it will be still possible to have full tracing on shipping, like we do now and it won’t be removed in favor of some very limited profiling. It is working quite well for us.
Do you think this could be controlled by some #define which can be added from our target cs file? Currently it is not possible to do and requires also removing the static asserts.
Thank you for the change around METASOUND_CPUPROFILERTRACE_ENABLED, that will also help us with maintanance in the future.
The reason those checks are there is to clearly communicate to licensees that full tracing in shipping is unsupported. As long as that is clear I’m happy.
So I’m adding check for a “undocumented” UE_TRACE_FULL_SHIPPING_ENABLED_UNSUPPORTED define, that when defined bypasses the static assert checks.
Thanks a lot Johan! In that case we can close this ticket.