Meter.CreateCounter Método

Definição

Sobrecargas

CreateCounter<T>(String, String, String)

Create um objeto Counter de métricas.

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

Cria um objeto Counter de métricas.

CreateCounter<T>(String, String, String)

Origem:
Meter.cs
Origem:
Meter.cs
Origem:
Meter.cs

Create um objeto Counter de métricas.

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)

Parâmetros de tipo

T

O tipo numérico da medida.

Parâmetros

name
String

O nome do instrumento. Não pode ser null.

unit
String

Unidade de medidas de instrumento opcional.

description
String

Descrição do instrumento opcional.

Retornos

Um novo contador.

Comentários

Counter é um instrumento que dá suporte a incrementos não negativos. Exemplo de usos para Contador:

  • Conte o número de bytes recebidos.
  • Conte o número de solicitações concluídas.
  • Conte o número de contas criadas.
  • Conte o número de pontos de verificação executados.
  • Conte o número de erros HTTP 5xx.

Aplica-se a

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

Origem:
Meter.cs
Origem:
Meter.cs

Cria um objeto Counter de métricas.

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)

Parâmetros de tipo

T

O tipo numérico da medida.

Parâmetros

name
String

O nome do instrumento. Não pode ser null.

unit
String

Uma unidade de medidas de instrumento opcional.

description
String

Uma descrição de instrumento opcional.

tags
IEnumerable<KeyValuePair<String,Object>>

As marcas a serem anexadas ao contador.

Retornos

Um novo contador.

Comentários

Counter é um Instrument que dá suporte a incrementos não negativos.

Exemplo de usos para Contador:

  • Conte o número de bytes recebidos.
  • Conte o número de solicitações concluídas.
  • Conte o número de contas criadas.
  • Conte o número de pontos de verificação executados.
  • Conte o número de erros HTTP 5xx.

Aplica-se a