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

OpenTelemetry.SuppressInstrumentationScope

Contains methods managing instrumentation of internal operations.
public static IDisposable Begin(bool value = true)

Begins a new scope in which instrumentation is suppressed (disabled).

public static int Enter()

Enters suppression mode. If suppression mode is enabled (slot.Depth is a negative integer), do nothing. If suppression mode is not enabled (slot is null), enter reference-counting suppression mode. If suppression mode is enabled (slot.Depth is a positive integer), increment the ref count.

public void Dispose()