diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/startup/StartupTimeMetricsListener.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/startup/StartupTimeMetricsListener.java index 7f5a4df7c193..de992b8c8672 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/startup/StartupTimeMetricsListener.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/startup/StartupTimeMetricsListener.java @@ -103,12 +103,12 @@ public void onApplicationEvent(ApplicationEvent event) { } private void onApplicationStarted(ApplicationStartedEvent event) { - registerGauge(this.startedTimeMetricName, "Time taken (ms) to start the application", event.getTimeTaken(), + registerGauge(this.startedTimeMetricName, "Time taken to start the application", event.getTimeTaken(), event.getSpringApplication()); } private void onApplicationReady(ApplicationReadyEvent event) { - registerGauge(this.readyTimeMetricName, "Time taken (ms) for the application to be ready to service requests", + registerGauge(this.readyTimeMetricName, "Time taken for the application to be ready to service requests", event.getTimeTaken(), event.getSpringApplication()); }