Interface IMetricRecorderFactory
Creates IMetricRecorder instances.
public interface IMetricRecorderFactory
Properties
Default
Returns the active metrics recorder factory.
public static IMetricRecorderFactory Default { get; set; }
Property Value
Methods
CreateCounter(string, IEnumerable<IMetricLabel>)
Creates a Counter recorder for metrics. Values in a counter recorder can only go up (or stay the same).
IMetricRecorder CreateCounter(string metricName, IEnumerable<IMetricLabel> labels)
Parameters
metricNamestringName of the metric
labelsIEnumerable<IMetricLabel>(optional) Labels that will be added to all the data points recorded in this recorder.
Returns
- IMetricRecorder
Instance of IMetricRecorder representing a counter recorder
CreateCounter(string, string, IEnumerable<IMetricLabel>)
Creates a Counter recorder for metrics. Values in a counter recorder can only go up (or stay the same).
IMetricRecorder CreateCounter(string metricName, string unit, IEnumerable<IMetricLabel> labels)
Parameters
metricNamestringName of the metric
unitstring(optional) Unit that the recorded values represent
labelsIEnumerable<IMetricLabel>(optional) Labels that will be added to all the data points recorded in this recorder.
Returns
- IMetricRecorder
Instance of IMetricRecorder representing a counter recorder
CreateGauge(string, IEnumerable<IMetricLabel>)
Creates a Gauge recorder for metrics. Values in a gauge recorder can go up and down.
IMetricRecorder CreateGauge(string metricName, IEnumerable<IMetricLabel> labels)
Parameters
metricNamestringName of the metric
labelsIEnumerable<IMetricLabel>(optional) Labels that will be added to all the data points recorded in this recorder.
Returns
- IMetricRecorder
Instance of IMetricRecorder representing a gauge recorder
CreateGauge(string, string, IEnumerable<IMetricLabel>)
Creates a Gauge recorder for metrics. Values in a gauge recorder can go up and down.
IMetricRecorder CreateGauge(string metricName, string unit, IEnumerable<IMetricLabel> labels)
Parameters
metricNamestringName of the metric
unitstring(optional) Unit that the recorded values represent
labelsIEnumerable<IMetricLabel>(optional) Labels that will be added to all the data points recorded in this recorder.
Returns
- IMetricRecorder
Instance of IMetricRecorder representing a gauge recorder