See gh-21110
This commit is contained in:
Johnny Lim 2020-04-24 23:14:48 +09:00 committed by Stephane Nicoll
parent 5077943b18
commit ef567388c1
5 changed files with 7 additions and 7 deletions

View File

@ -46,7 +46,7 @@ class KafkaMetricsAutoConfigurationTests {
}
@Test
void whenThereIsAnAProducerFactoryKafkaClientMetricsIsConfigured() {
void whenThereIsAProducerFactoryKafkaClientMetricsIsConfigured() {
this.contextRunner.withConfiguration(AutoConfigurations.of(KafkaAutoConfiguration.class))
.run((context) -> assertThat(context).hasSingleBean(KafkaClientMetrics.class));
}

View File

@ -62,7 +62,7 @@ class AppOpticsPropertiesConfigAdapterTests
}
@Test
void whenPropertiesFloorTimesIsSetAdapterHostTagReturnsIt() {
void whenPropertiesFloorTimesIsSetAdapterFloorTimesReturnsIt() {
AppOpticsProperties properties = createProperties();
properties.setFloorTimes(true);
assertThat(createConfigAdapter(properties).floorTimes()).isTrue();

View File

@ -49,7 +49,7 @@ class ElasticPropertiesConfigAdapterTests {
}
@Test
void whenPropertiesIndexDateSeparatorIsSetAdapterIndexDateFormatReturnsIt() {
void whenPropertiesIndexDateSeparatorIsSetAdapterIndexDateSeparatorReturnsIt() {
ElasticProperties properties = new ElasticProperties();
properties.setIndexDateSeparator("*");
assertThat(new ElasticPropertiesConfigAdapter(properties).indexDateSeparator()).isEqualTo("*");
@ -84,7 +84,7 @@ class ElasticPropertiesConfigAdapterTests {
}
@Test
void whenPropertiesPipelineIsSetAdapterPasswordReturnsIt() {
void whenPropertiesPipelineIsSetAdapterPipelineReturnsIt() {
ElasticProperties properties = new ElasticProperties();
properties.setPipeline("testPipeline");
assertThat(new ElasticPropertiesConfigAdapter(properties).pipeline()).isEqualTo("testPipeline");

View File

@ -2233,10 +2233,10 @@ If any of the keys to sanitize are URI format (i.e. `<scheme>://<username>:<pass
=== Map Health Indicators to Micrometer Metrics
Spring Boot health indicators return a `Status` type to indicate the overall system health.
If you want to monitor or alert on levels of health for a particular application, you can export these statuses as metrics via Micrometer.
By default, the status codes "`up`", "`down`", "`out of service`" and "`unknown`" are used by Spring Boot.
By default, the status codes "`UP`", "`DOWN`", "`OUT_OF_SERVICE`" and "`UNKNOWN`" are used by Spring Boot.
To export these, you'll need to convert these states to some set of numbers so that they can be used with a Micrometer `Gauge`.
The follow example shows one way to write such an exporter:
The following example shows one way to write such an exporter:
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----

View File

@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Phillip Webb
*/
@SpringBootTest
public class MetricsHealthMicrometerExportExampleTests {
class MetricsHealthMicrometerExportExampleTests {
@Autowired
private MeterRegistry registry;