public Set<MetricCategory> getMetricCategories() {
    checkState(
        metricCategoryRegistry != null, "Set metricCategoryRegistry before calling this method");

    final var list =
        metricCategories.stream().map(metricCategoryRegistry::getMetricCategory).toList();

    return Set.copyOf(list);
  }
Returns the metric categories.

@return the metric categories
app/src/main/java/org/hyperledger/besu/cli/options/MetricsOptions.java