class MetricsConf {

  @Bean
  MetricSender metricSender(ValidatedGraphite validatedGraphite) {
    if (validatedGraphite.isEnabled()) {
      return GraphiteMetricSender.newInstance(validatedGraphite.getHost(), validatedGraphite.getFormattedPrefix());
    }
    return MetricSender.DEFAULT_LOG_ONLY;
  }

}