@Override public void start() { if (outboundCounter != null) { outboundCounter.register(); } if (packetsCounter != null) { packetsCounter.register(); } if (emptyBatchesCounter != null) { emptyBatchesCounter.register(); } if (errorsCounter != null) { errorsCounter.register(); } if (responseLatency != null) { responseLatency.register(); } running = true; }
public PrometheusHistogram register() { histogram.register(); return this; }
public PrometheusHistogram register(CollectorRegistry registry) { histogram.register(registry); return this; }
public Histogram.Child addHistogram(String subsystem, String metric, String helpDoc, SortedMap<String, String> labels) { lock.writeLock().lock(); try { String name = name(subsystem, metric); Histogram histogram = histograms.get(name); if (histogram == null) { Histogram.Builder histogramBuilder = Histogram.build().name(name).help(helpDoc) .labelNames(labels.keySet().toArray(new String[]{})); histogramParameterizer.accept(histogramBuilder); histogram = histogramBuilder.create(); histogram.register(registry); histograms.put(name, histogram); } return histogram.labels(labels.values().toArray(new String[]{})); } finally { lock.writeLock().unlock(); } }
@Override public void start() { if (outboundCounter != null) { outboundCounter.register(); } if (packetsCounter != null) { packetsCounter.register(); } if (emptyBatchesCounter != null) { emptyBatchesCounter.register(); } if (errorsCounter != null) { errorsCounter.register(); } if (responseLatency != null) { responseLatency.register(); } running = true; }