<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.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.
namespace Microsoft.ApplicationInsights.Channel { public class InMemoryChannel : ITelemetryChannel, IDisposable, IAsyncFlushable, ISupportCredentialEnvelope { public bool? DeveloperMode { get; set; } public TimeSpan SendingInterval { get; set; } public string EndpointAddress { get; set; } public int MaxTelemetryBufferCapacity { get; set; } public int BacklogSize { get; set; } public InMemoryChannel(); public void Send(ITelemetry item); public void Flush(); public void Flush(TimeSpan timeout); public Task<bool> FlushAsync(CancellationToken cancellationToken); public void Dispose(); protected virtual void Dispose(bool disposing); } }