code: static void flushMetricsLogger(final MetricsLogger metricsLogger) {
          metricsLogger.flushToString(MetricsManager::queue);
          MetricsManager.rootMetricsLogger.flushToString(MetricsManager::queue);
      }
docs: Flush metrics collected by MetricsLogger to log files. Will be used by MetricsLogger to flush itself.
  
  @param metricsLogger, contain metric dimensions, metric names, metric data (counter, timer, recorder)