You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should take advantage of OTel SDK's self-diagnostics for internal logging and try to adopt it in the native code.
We could do it by emitting EventSource events from the C++ code. Then we would probably need to create guidelines/tools to be able to catch these events in case the process crashes before OTel SDK's self-diagnostic is initialized (as well as to catch events that are emitted before it is initialized). Or we should have a separate mechanism for logging before OTel SDK's self-diagnostic is initialized.
The text was updated successfully, but these errors were encountered:
The native code has the ability to run before any managed code is loaded/executed. In particular the initialization code of the profiler runs before any managed code is loaded, and those initialization related logs are very important, so the solution that we choose needs to ensure that we can capture those logs.
@nrcventura Q is very relevant. Initially, we could simply have a point at which the native code switches from file to EventSource. Anyway, let's record that the runtime provides support to write EventSource events from a CLR profiler. ICorProfilerInfo12 introduced such support, however, it requires .NET 5.0 and above, so it is not available on any supported .NET Framework version.
We should take advantage of OTel SDK's self-diagnostics for internal logging and try to adopt it in the native code.
We could do it by emitting EventSource events from the C++ code. Then we would probably need to create guidelines/tools to be able to catch these events in case the process crashes before OTel SDK's self-diagnostic is initialized (as well as to catch events that are emitted before it is initialized). Or we should have a separate mechanism for logging before OTel SDK's self-diagnostic is initialized.
The text was updated successfully, but these errors were encountered: