in src/main/java/org/apache/sling/discovery/impl/support/MetricReporter.java [173:205]
protected void activate() {
logger.debug("activate: start");
createGauge(METRICS_NAME_TOPOLOGY_INIT_EVENTS, (Gauge<Integer>) initEvents::get);
createGauge(METRICS_NAME_TOPOLOGY_CHANGING_EVENTS, (Gauge<Integer>) changingEvents::get);
createGauge(METRICS_NAME_TOPOLOGY_CHANGED_EVENTS, (Gauge<Integer>) changedEvents::get);
createGauge(METRICS_NAME_PROPERTY_CHANGED_EVENTS, (Gauge<Long>) propertyChangedEvents::get);
createGauge(METRICS_NAME_TOPOLOGY_IS_UNDEFINED, (Gauge<Integer>) topologyIsUndefined::get);
createGauge(METRICS_NAME_LOCAL_CLUSTER_INSTANCES, (Gauge<Integer>) localClusterInstances::get);
createGauge(METRICS_NAME_LOCAL_CLUSTER_JOINS, (Gauge<Integer>) localClusterJoins::get);
createGauge(METRICS_NAME_LOCAL_CLUSTER_LEAVES, (Gauge<Integer>) localClusterLeaves::get);
createGauge(METRICS_NAME_LOCAL_CLUSTER_LEADER_SWITCHES, (Gauge<Integer>) localClusterLeaderSwitches::get);
createGauge(METRICS_NAME_LOCAL_CLUSTER_PROPERTIES, (Gauge<Integer>) localClusterProperties::get);
createGauge(METRICS_NAME_OWN_IS_LEADER, (Gauge<Integer>) ownIsLeader::get);
createGauge(METRICS_NAME_OWN_PROPERTIES, (Gauge<Integer>) ownProperties::get);
createGauge(METRICS_NAME_REMOTE_CLUSTERS, (Gauge<Integer>) remoteClusters::get);
createGauge(METRICS_NAME_REMOTE_INSTANCES, (Gauge<Integer>) remoteInstances::get);
logger.info("activate: done.");
}