<PackageReference Include="OpenTelemetry" Version="1.21.0-rc.1" />

OpenTelemetry.Internal.StripedCounter

sealed class StripedCounter
A counter of in-flight operations which is split across per-processor slots so that threads entering and leaving concurrently do not all serialize on a single cache line.
public StripedCounter()

public int Enter()

Increments the counter.

public void Exit(int slot)

Decrements the counter on the slot returned by Enter.

public bool IsZero()

Gets a value indicating whether any operation is in flight.