From 853dbc3de3524842c0d9e4192d45cd9b7ddabd9e Mon Sep 17 00:00:00 2001 From: Oleg Sukhov Date: Tue, 2 Feb 2021 17:04:14 +0200 Subject: [PATCH 1/2] Clarify usage of BufferingApplicationStartup See gh-25075 --- .../src/docs/asciidoc/production-ready-features.adoc | 1 + .../spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc | 1 + 2 files changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc index eb4cce878a9..69534901f9b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc @@ -124,6 +124,7 @@ The following technology-agnostic endpoints are available: | `startup` | Shows the startup steps data collected by the `ApplicationStartup`. Requires the `SpringApplication` to be configured with a `BufferingApplicationStartup`. + More details about the implementations can be found at <> page. | `threaddump` | Performs a thread dump. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc index 1c9006c9c24..3f214461ca8 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc @@ -486,6 +486,7 @@ Once configured, you can record data by running the application with the Flight Spring Boot ships with the `BufferingApplicationStartup` variant; this implementation is meant for buffering the startup steps and draining them into an external metrics system. Applications can ask for the bean of type `BufferingApplicationStartup` in any component. Additionally, Spring Boot Actuator will <>. +Be aware, that during startup endpoint processing, all the collected steps will be pulled from the buffer, and sent in the response - so the further requests won't get the startup steps again. [[boot-features-external-config]] == Externalized Configuration From b2818680fdb198d73b2d293e2b6cfa473a3374aa Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 9 Feb 2021 09:31:21 +0100 Subject: [PATCH 2/2] Polish "Clarify usage of BufferingApplicationStartup" See gh-25075 --- .../src/docs/asciidoc/endpoints/startup.adoc | 7 +++---- .../src/docs/asciidoc/production-ready-features.adoc | 3 +-- .../src/docs/asciidoc/spring-boot-features.adoc | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/asciidoc/endpoints/startup.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/asciidoc/endpoints/startup.adoc index 76ac18e2365..e2ea646c636 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/asciidoc/endpoints/startup.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/asciidoc/endpoints/startup.adoc @@ -4,11 +4,10 @@ The `startup` endpoint provides information about the application's startup sequence. - [[startup-retrieving]] == Retrieving the Application Startup steps -To retrieve the steps recorded so far during the application startup phase , make a `POST` request to `/actuator/startup`, as shown in the following curl-based example: +To drain and return the steps recorded so far during the application startup phase, make a `POST` request to `/actuator/startup`, as shown in the following curl-based example: include::{snippets}/startup/curl-request.adoc[] @@ -16,12 +15,12 @@ The resulting response is similar to the following: include::{snippets}/startup/http-response.adoc[] - +NOTE: Each such call removes the returned steps from the buffer. [[startup-retrieving-response-structure]] === Response Structure -The response contains details of the application startup steps recorded so far by the application. +The response contains details of the application startup steps. The following table describes the structure of the response: [cols="2,1,3"] diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc index 69534901f9b..9e395a5df72 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc @@ -122,9 +122,8 @@ The following technology-agnostic endpoints are available: Disabled by default. | `startup` -| Shows the startup steps data collected by the `ApplicationStartup`. +| Shows the <> collected by the `ApplicationStartup`. Requires the `SpringApplication` to be configured with a `BufferingApplicationStartup`. - More details about the implementations can be found at <> page. | `threaddump` | Performs a thread dump. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc index 3f214461ca8..f840abb4790 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc @@ -485,8 +485,7 @@ Once configured, you can record data by running the application with the Flight Spring Boot ships with the `BufferingApplicationStartup` variant; this implementation is meant for buffering the startup steps and draining them into an external metrics system. Applications can ask for the bean of type `BufferingApplicationStartup` in any component. -Additionally, Spring Boot Actuator will <>. -Be aware, that during startup endpoint processing, all the collected steps will be pulled from the buffer, and sent in the response - so the further requests won't get the startup steps again. +Additionally, Spring Boot Actuator will {spring-boot-actuator-restapi-docs}/#startup[expose a `startup` endpoint to expose this information as a JSON document]. [[boot-features-external-config]] == Externalized Configuration