Share via


IVSCounter<T> Interface

Definition

A Counter with support for exposing Sum + Count, which are not supported directly by OpenTelemetry counters. Taking a dependency on this histogram allows developers to use more convenient types. The cost of taking a dependency on the VS type is that it it can require additional dev work to move to OpenTelemetry.

public interface IVSCounter<T> : Microsoft.VisualStudio.Telemetry.Metrics.ICounter<T> where T : struct
type IVSCounter<'T (requires 'T : struct)> = interface
    interface IInstrument
    interface ICounter<'T (requires 'T : struct)>
Public Interface IVSCounter(Of T)
Implements ICounter(Of T)

Type Parameters

T

The counter type. Supported types: Byte, Int16, Int32, Int64, Double, Single, and Decimal.

Implements

Properties

Count

Gets the Count of measurements.

Description

Gets the instrument description.

(Inherited from IInstrument)
Enabled

Gets a value indicating whether there are any listeners for this instrument.

(Inherited from IInstrument)
IsObservable

Gets a value indicating whether the instrument is an observable instrument.

(Inherited from IInstrument)
Meter

Gets the Meter that created the instrument.

(Inherited from IInstrument)
Name

Gets the instrument name.

(Inherited from IInstrument)
Sum

Gets the Sum of measurements.

Unit

Gets the instrument unit of measurements.

(Inherited from IInstrument)

Methods

Add(T, KeyValuePair<String,Object>, KeyValuePair<String,Object>, KeyValuePair<String,Object>)

Records the increment value of the measurement.

(Inherited from ICounter<T>)
Add(T, KeyValuePair<String,Object>, KeyValuePair<String,Object>)

Records the increment value of the measurement.

(Inherited from ICounter<T>)
Add(T, KeyValuePair<String,Object>)

Records the increment value of the measurement.

(Inherited from ICounter<T>)
Add(T, KeyValuePair<String,Object>[])

Records the increment value of the measurement.

(Inherited from ICounter<T>)
Add(T, ReadOnlySpan<KeyValuePair<String,Object>>)

Records the increment value of the measurement.

(Inherited from ICounter<T>)
Add(T)

Records the increment value of the measurement.

(Inherited from ICounter<T>)

Applies to