public Metric addDimensionsFrom(Metric other) {
        Map<String, String> combined = new LinkedHashMap<>(dimensions);
        other.dimensions.forEach(
                (k, v) -> {
                    if (!combined.containsKey(k)) combined.put(k, v);
                });

        return new Metric(name, outputName, description, combined);
    }
Returns a new Metric that is a combination of this and the given metric.
New dimensions from the given metric are added, but already existing
dimensions will be kept unchanged.

@param other The metric to add dimensions from.
@return A new metric with dimensions from this and the other.
metrics/src/main/java/ai/vespa/metrics/set/Metric.java