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

OpenTelemetry.PersistentStorage.FileSystem.DirectorySizeTracker

sealed class DirectorySizeTracker
Tracks the available storage in a specified directory.
public long MaxSizeInBytes { get; }

public DirectorySizeTracker(long maxSizeInBytes, string path)

public void FileAdded(long fileSizeInBytes)

public void FileRemoved(long fileSizeInBytes)

public bool IsSpaceAvailable(long additionalSizeInBytes, out long currentSizeInBytes)

Checks if the space is available for new blob.

public void RecountCurrentSize()