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

OpenTelemetry.Batch<T>

public struct Batch<T> : IDisposable
Stores a batch of completed T objects to be exported.

Enumerates the elements of a Batch<T>.

public long Count { get; }

Gets the count of items in the batch.

public Batch(T[] items, int count)

Initializes a new instance of the Batch<T> struct.

public Batch(T item)

Initializes a new instance of the Batch<T> struct.

public void Dispose()

Returns an enumerator that iterates through the Batch<T>.