Class SimpleclientCollector
Object
SimpleclientCollector
- All Implemented Interfaces:
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);
-
Method Details
-
collect
- Specified by:
collectin interfaceMultiCollector
-
builder
Currently there are no configuration options for the SimpleclientCollector. However, we want to follow the pattern to pass the config everywhere so that we can introduce config options later without the need for API changes. -
builder
-