code: @Inject void setMetricsFactory(@Nullable MetricsFactory metricsFactory) {
          if (metricsFactory != null) {
              configuration.withMetricsFactory(metricsFactory);
          }
      }
docs: Sets the metrics factory to use.
  
  @param metricsFactory The metrics factory