private static Set<Metric> getClusterControllerMetrics() {
        Set<Metric> metrics = new LinkedHashSet<>();

        addMetric(metrics, ClusterControllerMetrics.DOWN_COUNT.max());
        addMetric(metrics, ClusterControllerMetrics.INITIALIZING_COUNT.max());
        addMetric(metrics, ClusterControllerMetrics.MAINTENANCE_COUNT.max());
        addMetric(metrics, ClusterControllerMetrics.RETIRED_COUNT.max());
        addMetric(metrics, ClusterControllerMetrics.UP_COUNT.max());
        addMetric(metrics, ClusterControllerMetrics.NODES_NOT_CONVERGED.max());
        addMetric(metrics, ClusterControllerMetrics.CLUSTER_BUCKETS_OUT_OF_SYNC_RATIO.max());
        addMetric(metrics, ClusterControllerMetrics.STORED_DOCUMENT_COUNT.max());
        addMetric(metrics, ClusterControllerMetrics.STORED_DOCUMENT_BYTES.max());
        addMetric(metrics, ClusterControllerMetrics.CLUSTER_STATE_CHANGE_COUNT.baseName());
        addMetric(metrics, ClusterControllerMetrics.BUSY_TICK_TIME_MS, EnumSet.of(max, sum, count));
        addMetric(metrics, ClusterControllerMetrics.IDLE_TICK_TIME_MS, EnumSet.of(max, sum, count));

        addMetric(metrics, ClusterControllerMetrics.WORK_MS, EnumSet.of(sum, count));

        addMetric(metrics, ClusterControllerMetrics.IS_MASTER.max());

        // TODO(hakonhall): Update this name once persistent "count" metrics has been implemented.
        // DO NOT RELY ON THIS METRIC YET.
        addMetric(metrics, ClusterControllerMetrics.NODE_EVENT_COUNT.baseName());
        addMetric(metrics, ClusterControllerMetrics.RESOURCE_USAGE_NODES_ABOVE_LIMIT.max());
        addMetric(metrics, ClusterControllerMetrics.RESOURCE_USAGE_MAX_MEMORY_UTILIZATION.max());
        addMetric(metrics, ClusterControllerMetrics.RESOURCE_USAGE_MAX_DISK_UTILIZATION.max());
        addMetric(metrics, ClusterControllerMetrics.RESOURCE_USAGE_MEMORY_LIMIT.max());
        addMetric(metrics, ClusterControllerMetrics.RESOURCE_USAGE_DISK_LIMIT.max());
        addMetric(metrics, ClusterControllerMetrics.REINDEXING_PROGRESS.max());

        return metrics;
    }
Encapsulates vespa service metrics.

@author gjoranv
@author yngve
metrics/src/main/java/ai/vespa/metrics/set/Vespa9VespaMetricSet.java