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

OpenTelemetry.Internal.BatchExportWorker<T>

abstract class BatchExportWorker<T> : IDisposable
Abstract base class for batch export workers that handle the threading and synchronization logic for batch export processors.
protected CircularBuffer<T> CircularBuffer { get; }

Gets the circular buffer for storing telemetry objects.

protected BaseExporter<T> Exporter { get; }

Gets the exporter instance.

protected int ExporterTimeoutMilliseconds { get; }

Gets the timeout for export operations in milliseconds.

protected int MaxExportBatchSize { get; }

Gets the maximum batch size for exports.

protected int ScheduledDelayMilliseconds { get; }

Gets the delay between exports in milliseconds.

protected long ShutdownDrainTarget { get; }

Gets the shutdown drain target.

protected BatchExportWorker(CircularBuffer<T> circularBuffer, BaseExporter<T> exporter, int maxExportBatchSize, int scheduledDelayMilliseconds, int exporterTimeoutMilliseconds)

Initializes a new instance of the BatchExportWorker<T> class.

public void Dispose()

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by this class and optionally releases the managed resources.

public void IncrementDroppedCount()

Increments the dropped count.

protected void PerformExport()

Performs the export operation.

protected void SetShutdownDrainTarget(long target)

Sets the shutdown drain target.

protected bool ShouldShutdown()

Checks if shutdown should occur.

public abstract bool Shutdown(int timeoutMilliseconds)

Initiates shutdown and waits for completion.

public abstract void Start()

Starts the worker.

public abstract bool TriggerExport()

Triggers an export operation.

public abstract bool WaitForExport(int timeoutMilliseconds)

Waits for export to complete.