I've been trying to diagnose a performance issue and am digging deep into ETW traces, but it's hard to make progress without having some custom ETW events to provide more context to the trace. Unfortunately I haven't found any guidance about tracing custom ETW events from Unity (UWP/IL2CPP). I did try the .NET EventSource API, and while that can be translated to IL2CPP and built successfully, it appears to do nothing. Is there a quick way to log some custom ETW events? Otherwise, I think native plugin is the only way to go.
Native plugin might be the right way to do this today. EventSource APIs seem to be unimplemented in Mono class libraries, although we do have an active bug on that and will address it at some point.
Well good news, it was pretty easy to log an event from a script using the WINDOWS_UWP ifdef and logging events via the LoggingChannel API. https://docs.microsoft.com/en-us/uwp/api/windows.foundation.diagnostics.loggingchannel The if_def's are annoying, but only a minor hurdle!