@Override
    public void process(MetricsPacket.Builder builder) {
        String clusterType = emptyIfNull(builder.getDimensionValue(toDimensionId(INTERNAL_CLUSTER_TYPE)));
        String clusterId = emptyIfNull(builder.getDimensionValue(toDimensionId(INTERNAL_CLUSTER_ID)));

        String newClusterId;
        if (! clusterType.isEmpty() && ! clusterId.isEmpty())
            newClusterId = clusterType + "/" + clusterId;
        else if (! clusterType.isEmpty())
            newClusterId = clusterType;
        else if (! clusterId.isEmpty())
            newClusterId = clusterId;
        else
            return;  // Both type and id were null or empty

        builder.putDimension(toDimensionId(CLUSTER_ID), newClusterId);
    }
Replaces the current cluster ID dimension value with "clustertype/clusterid".

@author gjoranv
metrics-proxy/src/main/java/ai/vespa/metricsproxy/http/application/ClusterIdDimensionProcessor.java