<PackageReference Include="OpenTelemetry" Version="1.15.1" />

OpenTelemetry.Metrics.MeterProviderExtensions

public static class MeterProviderExtensions
Contains extension methods for the MeterProvider class.
public static bool ForceFlush(this MeterProvider provider, int timeoutMilliseconds = -1)

Flushes all the readers registered under MeterProviderSdk, blocks the current thread until flush completed, shutdown signaled or timed out.

public static bool Shutdown(this MeterProvider provider, int timeoutMilliseconds = -1)

Attempts to shutdown the MeterProviderSdk, blocks the current thread until shutdown completed or timed out.