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

OpenTelemetry.BaseProcessor<T>

public abstract class BaseProcessor<T> : IDisposable
Base processor base class.
public BaseProvider ParentProvider { get; }

Gets the parent BaseProvider.

public BaseProcessor()

Initializes a new instance of the BaseProcessor<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 bool ForceFlush(int timeoutMilliseconds = -1)

Flushes the processor, blocks the current thread until flush completed, shutdown signaled or timed out.

public virtual void OnEnd(T data)

Called synchronously when a telemetry object is ended.

protected virtual bool OnForceFlush(int timeoutMilliseconds)

Called by ForceFlush. This function should block the current thread until flush completed, shutdown signaled or timed out.

protected virtual bool OnShutdown(int timeoutMilliseconds)

Called by Shutdown. This function should block the current thread until shutdown completed or timed out.

public virtual void OnStart(T data)

Called synchronously when a telemetry object is started.

public bool Shutdown(int timeoutMilliseconds = -1)

Attempts to shutdown the processor, blocks the current thread until shutdown completed or timed out.