Class GaugeAttribute<T>

Namespace
Cratis.Metrics
Assembly
Cratis.Fundamentals.dll

Attribute for marking a method as a gauge for the metrics code generator.

[AttributeUsage(AttributeTargets.Method)]
public sealed class GaugeAttribute<T> : Attribute

Type Parameters

T

Type of counter.

Inheritance
GaugeAttribute<T>
Inherited Members
Extension Methods

Remarks

Gauges are used to measure the value of a particular thing at a particular time.

Constructors

GaugeAttribute(string, string)

Initializes a new instance of the GaugeAttribute<T> class without a unit.

public GaugeAttribute(string name, string description)

Parameters

name string

Name of the gauge.

description string

Description of the gauge.

GaugeAttribute(string, string, string?)

Attribute for marking a method as a gauge for the metrics code generator.

public GaugeAttribute(string name, string description, string? unit)

Parameters

name string

Name of the gauge.

description string

Description of the counter.

unit string

UCUM unit of the gauge.

Remarks

Gauges are used to measure the value of a particular thing at a particular time.

Properties

Description

Gets the description of the counter.

public string Description { get; }

Property Value

string

Name

Gets the name of the counter.

public string Name { get; }

Property Value

string

Unit

Gets the UCUM unit of the gauge.

public string? Unit { get; }

Property Value

string