Class MetricBase
- Namespace
- DotCompute.Core.Telemetry
- Assembly
- DotCompute.Core.dll
Base class for all metric types.
public abstract class MetricBase
- Inheritance
-
MetricBase
- Inherited Members
Constructors
MetricBase(string, string, string[])
Initializes a new metric.
protected MetricBase(string name, string help, string[] labelNames)
Parameters
Properties
Help
Gets the metric help text.
public string Help { get; }
Property Value
LabelNames
Gets the label names for this metric.
public string[] LabelNames { get; }
Property Value
- string[]
Name
Gets the metric name.
public string Name { get; }
Property Value
Methods
Export(StringBuilder)
Exports this metric in OpenMetrics format.
public abstract void Export(StringBuilder sb)
Parameters
FormatLabels(string[], string[])
Formats labels for export.
protected static string FormatLabels(string[] labelNames, string[] labelValues)