public static String buildName(final Class<?> clazz, final String... nameParts) {
        return MetricRegistry.name(
                Objects.requireNonNull(clazz),
                NullSafe.stream(nameParts)
                        .filter(Objects::nonNull)
                        .map(String::trim)
                        .map(part -> REPLACE_PATTERN.matcher(part).replaceAll(""))
                        .filter(Predicate.not(String::isEmpty))
                        .toArray(String[]::new));
    }
Build a metric name from the owning class and 0-many name parts.
Each part will have unsuitable characters stripped and be separated
by a '.' character. Name parts will be appended onto the fully qualified class name.

@param clazz
@param nameParts
@return The metric name
stroom-util/src/main/java/stroom/util/metrics/MetricsUtil.java