<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />

Microsoft.ApplicationInsights.Extensibility.SdkInternalOperationsMonitor

public static class SdkInternalOperationsMonitor
Helps to define whether thread is performing SDK internal operation at the moment.
public static void Enter()

Marks the thread as executing the internal operation.

public static void Exit()

Unmarks the thread as executing the internal operation.

public static bool IsEntered()

Determines whether the current thread executing the internal operation.