private String toPrometheusDimensions(MetricDimensions dimensions) {
        if (dimensions == null || !dimensions.iterator().hasNext()) return "";
        StringBuilder builder = new StringBuilder();
        builder.append("{");
        dimensions.forEach(entry -> {
            var sanitized = prometheusSanitizedName(entry.getKey()) + "=\"" + escapedLabelValue(entry.getValue()) + "\",";
            builder.append(sanitized);
        });
        builder.append("}");
        return builder.toString();
    }
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