private static List<Tuple> collapseMetrics(MetricSnapshot snapshot, String consumer) {
        return switch (consumer) {
            case HEALTH_PATH -> collapseHealthMetrics(snapshot);
            case "all", METRICS_PATH -> flattenAllMetrics(snapshot);  // TODO: Remove "all" on Vespa 9
            default -> throw new IllegalArgumentException("Unknown consumer '" + consumer + "'.");
        };
    }
A handler which returns state (health) information from this container instance: Status, metrics and vespa version.

@author Simon Thoresen Hult
container-core/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java