Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ff317330
Commit
ff317330
authored
Apr 25, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21110 from izeye
* pr/21110: Polish Closes gh-21110
parents
5077943b
ef567388
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
KafkaMetricsAutoConfigurationTests.java
...configure/metrics/KafkaMetricsAutoConfigurationTests.java
+1
-1
AppOpticsPropertiesConfigAdapterTests.java
...port/appoptics/AppOpticsPropertiesConfigAdapterTests.java
+1
-1
ElasticPropertiesConfigAdapterTests.java
...s/export/elastic/ElasticPropertiesConfigAdapterTests.java
+2
-2
howto.adoc
...oot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc
+2
-2
MetricsHealthMicrometerExportExampleTests.java
...te/metrics/MetricsHealthMicrometerExportExampleTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/KafkaMetricsAutoConfigurationTests.java
View file @
ff317330
...
@@ -46,7 +46,7 @@ class KafkaMetricsAutoConfigurationTests {
...
@@ -46,7 +46,7 @@ class KafkaMetricsAutoConfigurationTests {
}
}
@Test
@Test
void
whenThereIsA
nA
ProducerFactoryKafkaClientMetricsIsConfigured
()
{
void
whenThereIsAProducerFactoryKafkaClientMetricsIsConfigured
()
{
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
KafkaAutoConfiguration
.
class
))
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
KafkaAutoConfiguration
.
class
))
.
run
((
context
)
->
assertThat
(
context
).
hasSingleBean
(
KafkaClientMetrics
.
class
));
.
run
((
context
)
->
assertThat
(
context
).
hasSingleBean
(
KafkaClientMetrics
.
class
));
}
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/appoptics/AppOpticsPropertiesConfigAdapterTests.java
View file @
ff317330
...
@@ -62,7 +62,7 @@ class AppOpticsPropertiesConfigAdapterTests
...
@@ -62,7 +62,7 @@ class AppOpticsPropertiesConfigAdapterTests
}
}
@Test
@Test
void
whenPropertiesFloorTimesIsSetAdapter
HostTag
ReturnsIt
()
{
void
whenPropertiesFloorTimesIsSetAdapter
FloorTimes
ReturnsIt
()
{
AppOpticsProperties
properties
=
createProperties
();
AppOpticsProperties
properties
=
createProperties
();
properties
.
setFloorTimes
(
true
);
properties
.
setFloorTimes
(
true
);
assertThat
(
createConfigAdapter
(
properties
).
floorTimes
()).
isTrue
();
assertThat
(
createConfigAdapter
(
properties
).
floorTimes
()).
isTrue
();
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticPropertiesConfigAdapterTests.java
View file @
ff317330
...
@@ -49,7 +49,7 @@ class ElasticPropertiesConfigAdapterTests {
...
@@ -49,7 +49,7 @@ class ElasticPropertiesConfigAdapterTests {
}
}
@Test
@Test
void
whenPropertiesIndexDateSeparatorIsSetAdapterIndexDate
Format
ReturnsIt
()
{
void
whenPropertiesIndexDateSeparatorIsSetAdapterIndexDate
Separator
ReturnsIt
()
{
ElasticProperties
properties
=
new
ElasticProperties
();
ElasticProperties
properties
=
new
ElasticProperties
();
properties
.
setIndexDateSeparator
(
"*"
);
properties
.
setIndexDateSeparator
(
"*"
);
assertThat
(
new
ElasticPropertiesConfigAdapter
(
properties
).
indexDateSeparator
()).
isEqualTo
(
"*"
);
assertThat
(
new
ElasticPropertiesConfigAdapter
(
properties
).
indexDateSeparator
()).
isEqualTo
(
"*"
);
...
@@ -84,7 +84,7 @@ class ElasticPropertiesConfigAdapterTests {
...
@@ -84,7 +84,7 @@ class ElasticPropertiesConfigAdapterTests {
}
}
@Test
@Test
void
whenPropertiesPipelineIsSetAdapterP
assword
ReturnsIt
()
{
void
whenPropertiesPipelineIsSetAdapterP
ipeline
ReturnsIt
()
{
ElasticProperties
properties
=
new
ElasticProperties
();
ElasticProperties
properties
=
new
ElasticProperties
();
properties
.
setPipeline
(
"testPipeline"
);
properties
.
setPipeline
(
"testPipeline"
);
assertThat
(
new
ElasticPropertiesConfigAdapter
(
properties
).
pipeline
()).
isEqualTo
(
"testPipeline"
);
assertThat
(
new
ElasticPropertiesConfigAdapter
(
properties
).
pipeline
()).
isEqualTo
(
"testPipeline"
);
...
...
spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc
View file @
ff317330
...
@@ -2233,10 +2233,10 @@ If any of the keys to sanitize are URI format (i.e. `<scheme>://<username>:<pass
...
@@ -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
=== Map Health Indicators to Micrometer Metrics
Spring Boot health indicators return a `Status` type to indicate the overall system health.
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.
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`.
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 follow
ing
example shows one way to write such an exporter:
[source,java,indent=0,subs="verbatim,quotes,attributes"]
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
----
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/actuate/metrics/MetricsHealthMicrometerExportExampleTests.java
View file @
ff317330
...
@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
...
@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Phillip Webb
* @author Phillip Webb
*/
*/
@SpringBootTest
@SpringBootTest
public
class
MetricsHealthMicrometerExportExampleTests
{
class
MetricsHealthMicrometerExportExampleTests
{
@Autowired
@Autowired
private
MeterRegistry
registry
;
private
MeterRegistry
registry
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment