Język

Meter.CreateCounter Metoda

Definicja

Przeciążenia

CreateCounter<T>(String, String, String)

Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs

Utwórz obiekt licznika metryk.

public System.Diagnostics.Metrics.Counter<T> CreateCounter<T>(string name, string? unit = default, string? description = default) where T : struct;
member this.CreateCounter : string * string * string -> System.Diagnostics.Metrics.Counter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateCounter(Of T As Structure) (name As String, Optional unit As String = Nothing, Optional description As String = Nothing) As Counter(Of T)

Parametry typu

T

Typ liczbowy miary.

Parametry

name
String

Nazwa instrumentu. Nie można mieć .null

unit
String

Opcjonalna jednostka instrumentacja pomiarów.

description
String

Opcjonalny opis instrumentu.

Zwraca

Nowy licznik.

Uwagi

Counter to instrument, który obsługuje nieujemne przyrosty. Przykładowe zastosowania dla licznika:

  • Zlicz liczbę odebranych bajtów.
  • Zlicz liczbę ukończonych żądań.
  • Zlicz liczbę utworzonych kont.
  • Zlicz liczbę uruchomionych punktów kontrolnych.
  • Zlicz liczbę błędów HTTP 5xx.

Dotyczy

CreateCounter<T>(String, String, String, IEnumerable<KeyValuePair<String,Object>>)

Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs
Źródło:
Meter.cs

Tworzy obiekt licznika metryk.

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::Counter<T> ^ CreateCounter(System::String ^ name, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.Counter<T> CreateCounter<T>(string name, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
public System.Diagnostics.Metrics.Counter<T> CreateCounter<T>(string name, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
member this.CreateCounter : string * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.Counter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateCounter(Of T As Structure) (name As String, unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As Counter(Of T)

Parametry typu

T

Typ liczbowy miary.

Parametry

name
String

Nazwa instrumentu. Nie można go null.

unit
String

Opcjonalna jednostka instrumentacja pomiarów.

description
String

Opcjonalny opis instrumentu.

tags
IEnumerable<KeyValuePair<String,Object>>

Tagi do dołączenia do licznika.

Zwraca

Nowy licznik.

Uwagi

Counter to instrument, który obsługuje przyrosty nieujemne.

Przykładowe zastosowania dla licznika:

  • Zlicz liczbę odebranych bajtów.
  • Zlicz liczbę ukończonych żądań.
  • Zlicz liczbę utworzonych kont.
  • Zlicz liczbę uruchomionych punktów kontrolnych.
  • Zlicz liczbę błędów HTTP 5xx.

Dotyczy