Meter.CreateCounter 메서드

정의

오버로드

CreateCounter<T>(String, String, String)

메트릭 Counter 개체를 Create.

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

메트릭 Counter 개체를 만듭니다.

CreateCounter<T>(String, String, String)

Source:
Meter.cs
Source:
Meter.cs
Source:
Meter.cs

메트릭 Counter 개체를 Create.

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)

형식 매개 변수

T

측정값의 숫자 형식입니다.

매개 변수

name
String

계측 이름입니다. null일 수 없습니다.

unit
String

측정의 선택적 계측 단위입니다.

description
String

선택적 계측 설명입니다.

반환

새 카운터.

설명

카운터는 음수가 아닌 증분을 지원하는 계측기입니다. 카운터에 대한 예제 사용:

  • 받은 바이트 수를 계산합니다.
  • 완료된 요청 수를 계산합니다.
  • 만든 계정 수를 계산합니다.
  • 실행된 검사점 수를 계산합니다.
  • HTTP 5xx 오류 수를 계산합니다.

적용 대상

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

Source:
Meter.cs
Source:
Meter.cs

메트릭 Counter 개체를 만듭니다.

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;
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)

형식 매개 변수

T

측정값의 숫자 형식입니다.

매개 변수

name
String

계측 이름입니다. null일 수 없습니다.

unit
String

측정의 선택적 계측 단위입니다.

description
String

선택적 계측 설명입니다.

tags
IEnumerable<KeyValuePair<String,Object>>

카운터에 연결할 태그입니다.

반환

새 카운터.

설명

카운터는 음수가 아닌 증분을 지원하는 계측기입니다.

카운터에 대한 예제 사용:

  • 받은 바이트 수를 계산합니다.
  • 완료된 요청 수를 계산합니다.
  • 만든 계정 수를 계산합니다.
  • 실행된 검사점 수를 계산합니다.
  • HTTP 5xx 오류 수를 계산합니다.

적용 대상