private static Map<String, VespaMetrics[]> getMetrics() {
        return Map.of(
                "Container", Stream.concat(Arrays.stream(ContainerMetrics.values()), Arrays.stream(MicrometerMetrics.values()))
                    .toArray(VespaMetrics[]::new),
                "SearchNode", SearchNodeMetrics.values(),
                "Storage", StorageMetrics.values(),
                "Distributor", DistributorMetrics.values(),
                "ConfigServer", ConfigServerMetrics.values(),
                "Logd", LogdMetrics.values(),
                "NodeAdmin", NodeAdminMetrics.values(),
                "Slobrok", SlobrokMetrics.values(),
                "Sentinel", SentinelMetrics.values(),
                "ClusterController", ClusterControllerMetrics.values()
        );
    }
@author olaa

Helper class to generate metric reference documentation for docs.vespa.ai
metrics/src/main/java/ai/vespa/metrics/docs/DocumentationGenerator.java