Skip to content

Add startup Actuator endpoint #23213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bclozel opened this issue Sep 7, 2020 · 4 comments
Closed

Add startup Actuator endpoint #23213

bclozel opened this issue Sep 7, 2020 · 4 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Sep 7, 2020

As of #22603, developers can configure a BufferingApplicationStartup on their SpringApplication and collect application startup events.

While this feature can be used by a custom component to push this data in an external metrics system - we should provide a dedicated Actuator endpoint that drains the buffered data and exports it as a JSON document for further analysis.

@bclozel bclozel added the type: enhancement A general enhancement label Sep 7, 2020
@bclozel bclozel added this to the 2.4.0-M3 milestone Sep 7, 2020
@bclozel bclozel self-assigned this Sep 7, 2020
@bclozel bclozel closed this as completed in 676e180 Sep 7, 2020
@wilkinsona
Copy link
Member

wilkinsona commented Sep 7, 2020

It's unusual for a @ReadOperation (which maps to a GET request with HTTP access) to have side-effects. I wonder if it should be a @WriteOperation (POST request when exposed over HTTP) of some form? The goal of that would be to make the draining behaviour clearer and also align a bit better with conventional HTTP semantics.

@bclozel bclozel reopened this Sep 7, 2020
@bclozel
Copy link
Member Author

bclozel commented Sep 7, 2020

Good call, I'll change that to a POST. I don't see the point of adding a fetch-only variant (i.e. not draining) but at least this change leaves this option on the table.

@bclozel bclozel closed this as completed in 8dcb331 Sep 7, 2020
@qian0205
Copy link

qian0205 commented Dec 3, 2020

hello, I want to use the startup endpoint of actuator, but i don't know how to configure and code. Can you post the code for reference, Thanks!

@bclozel
Copy link
Member Author

bclozel commented Dec 3, 2020

@qian0205 this section of the reference documentation should help. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants