Class OpenMetricsWriter
java.lang.Object
org.torproject.metrics.descriptorparser.utils.OpenMetricsWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
processNetworkTotal
(Gauge inprogressRequests, Long timestamp, double value) Process network totals instead of node metrics.void
processRelayReqCountry
(Gauge inprogressRequests, String fingerprint, String nickname, String country, Long timestamp, double value) Process dirreq requests per Country.void
processRequest
(Gauge inprogressRequests, String fingerprint, String nickname, String node, Long timestamp, double value) Process generic node metrics that use only fingerprint nickname and (optional) node type.void
processRouterLabelmetrics
(Gauge inprogressRequests, String fingerprint, String nickname, String node, String country, String transport, String version, Long timestamp, double value) Process router dirreq request per country version and transport.void
pushToGateway
(io.prometheus.client.CollectorRegistry registry) Push metrics to a push gateway.
-
Constructor Details
-
OpenMetricsWriter
public OpenMetricsWriter()
-
-
Method Details
-
processNetworkTotal
Process network totals instead of node metrics.Processed metrics have no attribute labels.
-
processRequest
public void processRequest(Gauge inprogressRequests, String fingerprint, String nickname, String node, Long timestamp, double value) Process generic node metrics that use only fingerprint nickname and (optional) node type. -
processRelayReqCountry
public void processRelayReqCountry(Gauge inprogressRequests, String fingerprint, String nickname, String country, Long timestamp, double value) Process dirreq requests per Country. -
processRouterLabelmetrics
public void processRouterLabelmetrics(Gauge inprogressRequests, String fingerprint, String nickname, String node, String country, String transport, String version, Long timestamp, double value) Process router dirreq request per country version and transport. -
pushToGateway
public void pushToGateway(io.prometheus.client.CollectorRegistry registry) Push metrics to a push gateway.
-