共用方式為


InMemoryChannel Class

Definition

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 class InMemoryChannel : IDisposable, Microsoft.ApplicationInsights.Channel.IAsyncFlushable, Microsoft.ApplicationInsights.Channel.ITelemetryChannel
type InMemoryChannel = class
    interface ITelemetryChannel
    interface IDisposable
    interface IAsyncFlushable
Public Class InMemoryChannel
Implements IAsyncFlushable, IDisposable, ITelemetryChannel
Inheritance
InMemoryChannel
Implements

Constructors

InMemoryChannel()

Initializes a new instance of the InMemoryChannel class.

Properties

BacklogSize

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.

DeveloperMode

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

EndpointAddress

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

MaxTelemetryBufferCapacity

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.

SendingInterval

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

Methods

Dispose()

Disposing the channel.

Dispose(Boolean)

Dispose the channel if not already disposed.

Flush()

Will send all the telemetry items stored in the memory.

Flush(TimeSpan)

Will send all the telemetry items stored in the memory.

FlushAsync(CancellationToken)

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

Send(ITelemetry)

Sends an instance of ITelemetry through the channel.

Applies to