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

Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.SelfDiagnostics.SelfDiagnosticsInitializer

Self diagnostics class captures the EventSource events sent by Application Insights modules and writes them to local file for internal troubleshooting.
public static void EnsureInitialized()

Trigger CLR to initialize static fields and static constructors of SelfDiagnosticsInitializer. No member of SelfDiagnosticsInitializer class is explicitly called when an EventSource class, say AspNetCoreEventSource, is invoked to send an event. This method needs to be called in order to capture any EventSource event.

public void Dispose()

protected virtual void Dispose(bool disposing)

Disposes config refresher.