Class SimpleclientCollector

Object
SimpleclientCollector
All Implemented Interfaces:
MultiCollector

public class SimpleclientCollector extends Object implements MultiCollector
Bridge from simpleclient (version 0.16.0 and older) to the new prometheus-metrics (version 1.0.0 and newer).

Usage: The following line will register all metrics from a simpleclient CollectorRegistry.defaultRegistry to a prometheus-metrics PrometheusRegistry.defaultRegistry:


 SimpleclientCollector.builder().register();
 

If you have custom registries (not the default registries), use the following snippet:


 CollectorRegistry simpleclientRegistry = ...;
 PrometheusRegistry prometheusRegistry = ...;
 SimpleclientCollector.builder()
     .collectorRegistry(simpleclientRegistry)
     .register(prometheusRegistry);