Udostępnij przez


ICounter<T> Interfejs

Definicja

Licznik zdefiniowany przez standard OpenTelemetry. Specyfikacja interfejsu OPENTelemetry: https://opentelemetry.io/docs/reference/specification/metrics/api/ specyfikacja interfejsu API platformy .NET: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.counter-1?view=net-6.0

Ten interfejs umożliwia kodowanie do standardu OpenTelemetry bez uaktualniania naszych .NET Framework. Ponieważ jest to ten sam standard, możemy zaktualizować implementacje do cienkiej otoki wokół OTel, gdy wszystko będzie gotowe. Pozwala to również uniknąć ponownego instrumentacji dla deweloperów.

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

Parametry typu

T

Typ licznika. Obsługiwane typy: Byte, , Int16, Int64Int32, Double, Singlei Decimal.

Pochodne
Implementuje

Właściwości

Description

Pobiera opis instrumentu.

(Odziedziczone po IInstrument)
Enabled

Pobiera wartość wskazującą, czy istnieją jakieś odbiorniki dla tego instrumentu.

(Odziedziczone po IInstrument)
IsObservable

Pobiera wartość wskazującą, czy instrument jest obserwowalnym instrumentem.

(Odziedziczone po IInstrument)
Meter

Pobiera miernik, który utworzył instrument.

(Odziedziczone po IInstrument)
Name

Pobiera nazwę instrumentu.

(Odziedziczone po IInstrument)
Unit

Pobiera jednostkę instrumentu pomiarów.

(Odziedziczone po IInstrument)

Metody

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

Rejestruje wartość przyrostu miary.

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

Rejestruje wartość przyrostu miary.

Add(T, KeyValuePair<String,Object>)

Rejestruje wartość przyrostu miary.

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

Rejestruje wartość przyrostu miary.

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

Rejestruje wartość przyrostu miary.

Add(T)

Rejestruje wartość przyrostu miary.

Dotyczy