Merge pull request #12124 from Jon Schneider

* gh-12124:
  Polish "Bind StatsD queue gauges"
  Bind StatsD queue gauges
pull/12083/merge
Andy Wilkinson 7 years ago
commit ef19b04206

@ -20,6 +20,7 @@ import io.micrometer.core.instrument.Clock;
import io.micrometer.core.instrument.util.HierarchicalNameMapper;
import io.micrometer.statsd.StatsdConfig;
import io.micrometer.statsd.StatsdMeterRegistry;
import io.micrometer.statsd.StatsdMetrics;
import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
@ -70,4 +71,9 @@ public class StatsdMetricsExportAutoConfiguration {
return HierarchicalNameMapper.DEFAULT;
}
@Bean
public StatsdMetrics statsdMetrics() {
return new StatsdMetrics();
}
}

@ -56,12 +56,13 @@ public class StatsdMetricsExportAutoConfigurationTests {
}
@Test
public void autoConfiguresItsConfigMeterRegistryAndNameMapper() {
public void autoConfiguresItsConfigMeterRegistryNameMapperAndMetrics() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
.run((context) -> assertThat(context)
.hasSingleBean(StatsdMeterRegistry.class)
.hasSingleBean(StatsdConfig.class)
.hasSingleBean(HierarchicalNameMapper.class));
.hasSingleBean(HierarchicalNameMapper.class)
.hasSingleBean(StatsdMetrics.class));
}
@Test

Loading…
Cancel
Save