Class PrometheusTextFormat
- java.lang.Object
-
- org.apache.bookkeeper.stats.prometheus.PrometheusTextFormat
-
public class PrometheusTextFormat extends java.lang.Object
Logic to write metrics in Prometheus text format.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Set<java.lang.String>
metricNameSet
-
Constructor Summary
Constructors Constructor Description PrometheusTextFormat()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.String
getTypeNameSuffix(io.prometheus.client.Collector.Type type)
(package private) static java.lang.String
getTypeStr(io.prometheus.client.Collector.Type type)
(package private) void
writeCounter(java.io.Writer w, java.lang.String name, LongAdderCounter counter)
(package private) void
writeGauge(java.io.Writer w, java.lang.String name, SimpleGauge<? extends java.lang.Number> gauge)
(package private) static void
writeMetricsCollectedByPrometheusClient(java.io.Writer w, io.prometheus.client.CollectorRegistry registry)
(package private) void
writeOpStat(java.io.Writer w, java.lang.String name, DataSketchesOpStatsLogger opStat)
(package private) void
writeType(java.io.Writer w, java.lang.String name, java.lang.String type)
-
-
-
Method Detail
-
writeGauge
void writeGauge(java.io.Writer w, java.lang.String name, SimpleGauge<? extends java.lang.Number> gauge)
-
writeCounter
void writeCounter(java.io.Writer w, java.lang.String name, LongAdderCounter counter)
-
writeOpStat
void writeOpStat(java.io.Writer w, java.lang.String name, DataSketchesOpStatsLogger opStat)
-
writeMetricsCollectedByPrometheusClient
static void writeMetricsCollectedByPrometheusClient(java.io.Writer w, io.prometheus.client.CollectorRegistry registry) throws java.io.IOException
- Throws:
java.io.IOException
-
getTypeNameSuffix
static java.lang.String getTypeNameSuffix(io.prometheus.client.Collector.Type type)
-
getTypeStr
static java.lang.String getTypeStr(io.prometheus.client.Collector.Type type)
-
writeType
void writeType(java.io.Writer w, java.lang.String name, java.lang.String type) throws java.io.IOException
- Throws:
java.io.IOException
-
-