<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.Channel.InMemoryChannel

Represents a communication channel for sending telemetry to Application Insights via HTTPS. There will be a buffer that will not be persisted, to enforce the queued telemetry items to be sent, Flush should be called.
public int BacklogSize { get; set; }

Gets or sets the maximum number of telemetry items that can be in the backlog to send. This is a hard limit and Items will be dropped by the InMemoryChannel once this limit is hit until items are drained from the buffer.

public bool? DeveloperMode { get; set; }

Gets or sets a value indicating whether developer mode of telemetry transmission is enabled.

public string EndpointAddress { get; set; }

Gets or sets the HTTP address where the telemetry is sent.

public int MaxTelemetryBufferCapacity { get; set; }

Gets or sets the maximum number of telemetry items will accumulate in a memory before the InMemoryChannel serializing them for transmission to Application Insights. This is not a hard limit on how many unsent items can be in the buffer.

public TimeSpan SendingInterval { get; set; }

Gets or sets the sending interval. Once the interval expires, InMemoryChannel serializes the accumulated telemetry items for transmission and sends it over the wire.

public InMemoryChannel()

Initializes a new instance of the InMemoryChannel class.

public void Dispose()

Disposing the channel.

protected virtual void Dispose(bool disposing)

Dispose the channel if not already disposed.

public void Flush()

Will send all the telemetry items stored in the memory.

public void Flush(TimeSpan timeout)

Will send all the telemetry items stored in the memory.

public Task<bool> FlushAsync(CancellationToken cancellationToken)

Will send all the telemetry items stored in the memory asynchronously.

public void Send(ITelemetry item)

Sends an instance of ITelemetry through the channel.