Class OpenMetricsWriter

java.lang.Object
org.torproject.metrics.descriptorparser.utils.OpenMetricsWriter

public class OpenMetricsWriter extends Object
  • Constructor Details

    • OpenMetricsWriter

      public OpenMetricsWriter()
  • Method Details

    • processNetworkTotal

      public void processNetworkTotal(Gauge inprogressRequests, Long timestamp, double value)
      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.