docs: public TopologyMaster.MetricResponse getMetrics(TopologyMaster.MetricRequest request) {
      String componentName = request.getComponentName();
      if (!cache.componentInstanceExists(componentName, null)) {
        return buildResponseNotOk(
            String.format("Unknown component %s found in MetricRequest %s", componentName, request)
        ).build();
      }
      if (request.getInstanceIdCount() > 0) {
        for (String instanceId : request.getInstanceIdList()) {
          if (!cache.componentInstanceExists(componentName, instanceId)) {
            return buildResponseNotOk(
                String.format("Unknown instance %s found in MetricRequest %s", instanceId, request)
            ).build();
          }
        }
      }
      if (!request.hasInterval() && !request.hasExplicitInterval()) {
        return buildResponseNotOk("No purgeIntervalSec or explicit purgeIntervalSec set").build();
      }
  
      MetricRequest request1 = MetricsCacheQueryUtils.fromProtobuf(request);
      MetricResponse response1 = cache.getMetrics(request1, metricNameType);
      TopologyMaster.MetricResponse response = MetricsCacheQueryUtils.toProtobuf(response1, request1);
      return response;
    }