static String getMetricType(final Metric metric) {
        // Metrics are often lambdas so this makes it easier to see in the logs
        // what flavour of metric is being registered
        return switch (metric) {
            case null -> null;
            case MetricRegistry ignored -> MetricRegistry.class.getSimpleName();
            case Histogram ignored -> Histogram.class.getSimpleName();
            case Counter ignored -> Counter.class.getSimpleName();
            case Meter ignored -> Meter.class.getSimpleName();
            case Timer ignored -> Timer.class.getSimpleName();
            case RatioGauge ignored -> RatioGauge.class.getSimpleName();
            case CachedGauge<?> ignored -> CachedGauge.class.getSimpleName();
            case DerivativeGauge<?, ?> ignored -> DerivativeGauge.class.getSimpleName();
            case Gauge<?> ignored -> Gauge.class.getSimpleName();
            case MetricSet ignored -> MetricSet.class.getSimpleName();
            default -> metric.getClass().getSimpleName();
        };
    }
Register a metric with the default metric registry
stroom-util/src/main/java/stroom/util/metrics/MetricsUtil.java