Dela via


Meter Class

Definition

Meter is the class responsible for creating and tracking the Instruments. Mirrored from: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.meter?view=net-6.0.

public class Meter : IDisposable, Microsoft.VisualStudio.Telemetry.Metrics.IMeter
type Meter = class
    interface IMeter
    interface IDisposable
Public Class Meter
Implements IDisposable, IMeter
Inheritance
Meter
Implements

Constructors

Meter(String, String)

Initializes a new instance of the Meter class.

Meter(String)

Initializes a new instance of the Meter class.

Properties

Name

Gets the Meter name.

Version

Gets the Meter version.

Methods

CreateCounter<T>(String, String, String)

Create a metrics Counter object.

CreateHistogram<T>(String, HistogramConfiguration, String, String)

Creates a Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles.

CreateHistogram<T>(String, String, String)

Creates a Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles.

CreateUpDownCounter<T>(String, String, String)

Create an UpDownCounter, which is an instrument that can be used to track counts/sums which are not monotonic (can fluctuate in value).

CreateVSCounter<T>(String, String, String)

Create a VS Counter, which is an instrument that can be used to track counts/sums in monotonic scenarios (always increase/decrease). The VS version of a counter enables additional properties but requires additional work to migrate to OpenTelemetry when available.

CreateVSHistogram<T>(String, HistogramConfiguration, String, String)

Creates a VS Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The VS version of a histogram enables additional properties but requires additional work to migrate to OpenTelemetry when available.

CreateVSHistogram<T>(String, String, String)

Creates a VS Histogram, which is an instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentiles. The VS version of a histogram enables additional properties but requires additional work to migrate to OpenTelemetry when available.

CreateVSUpDownCounter<T>(String, String, String)

Create a VS UpDownCounter, which is an instrument that can be used to track counts/sums which are not monotonic (can fluctuate in value). The VS version of a counter enables additional properties but requires additional work to migrate to OpenTelemetry when available.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Applies to