Class PrometheusMetric
- java.lang.Object
-
- org.wso2.carbon.prometheus.publisher.model.PrometheusMetric
-
public class PrometheusMetric extends Object
Model class for metrics in Prometheus format
-
-
Constructor Summary
Constructors Constructor Description PrometheusMetric()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringformatMetric(PrometheusMetric metric)Formats the metric data into Prometheus formatStringgetHelp()StringgetMetricName()DoublegetMetricValue()StringgetPropertyString()StringgetType()voidsetHelp(String help)voidsetMetricName(String metricName)voidsetMetricValue(Double metricValue)voidsetPropertyString(String propertyString)voidsetType(String type)
-
-
-
Method Detail
-
formatMetric
public static String formatMetric(PrometheusMetric metric)
Formats the metric data into Prometheus format- Parameters:
metric- Metric object- Returns:
- Formatted metric string
-
getMetricName
public String getMetricName()
-
setMetricName
public void setMetricName(String metricName)
-
getHelp
public String getHelp()
-
setHelp
public void setHelp(String help)
-
getType
public String getType()
-
setType
public void setType(String type)
-
getMetricValue
public Double getMetricValue()
-
setMetricValue
public void setMetricValue(Double metricValue)
-
getPropertyString
public String getPropertyString()
-
setPropertyString
public void setPropertyString(String propertyString)
-
-