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
TType 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
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
namestringName of the gauge.
descriptionstringDescription of the counter.
unitstringUCUM 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
Name
Gets the name of the counter.
public string Name { get; }
Property Value
Unit
Gets the UCUM unit of the gauge.
public string? Unit { get; }