public static StateMetricContext newInstance(Map<String, ?> properties) {
        Map<String, String> data = (properties != null)
                ? properties.entrySet().stream().collect(
                        toUnmodifiableMap(Map.Entry::getKey, e -> Objects.requireNonNullElse(e.getValue(), "").toString()))
                : Map.of();
        return new StateMetricContext(data);
    }
A context implementation whose identity is the key and values such that this can be used as
a key in metrics lookups.

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