Skip to content

AppInsightsMetricListener Class

Definition

A listener for metrics which forwards data to AppInsights.

C#
public class AppInsightsMetricListener : IDisposable

Inheritance object

Implements IDisposable

Constructors

AppInsightsMetricListener(TelemetryClient, IOptions)

Initializes a new instance of the AppInsightsMetricListener class.

C#
public AppInsightsMetricListener(TelemetryClient client, IOptions<AppInsightsMetricListenerOptions> options)

Parameters

client TelemetryClient
The telemetry client.

options IOptions<AppInsightsMetricListenerOptions>
The listener options.

Properties

MeterListener

Gets the underlying listener.

C#
public MeterListener MeterListener { get; }

Methods

Start()

Starts the listener.

C#
public void Start()

Dispose()

Stops the listener.

C#
public void Dispose()