Skip to content

Instrument SpringBootApplication for application startup metrics #22600

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 Jul 27, 2020 · 0 comments
Closed

Instrument SpringBootApplication for application startup metrics #22600

bclozel opened this issue Jul 27, 2020 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Jul 27, 2020

As of spring-projects/spring-framework#24878, the application startup can be instrumented using ApplicationStartup and StartupStep. While the application context is already instrumented in Framework, the default ApplicationStartup implementation is a no-op and the only way to actually collect metrics is to configure a specific implementation to the AbstractApplicationContext.

This issue should focus on providing a simple way to choose an ApplicationStartup implementation for your Spring Boot application. Since this should happen really early in the startup process, at a time when the context is not even instantiated, we should probably rely on the SpringApplication / SpringApplicationBuilder to configure an implementation.

This issue should also use this new infrastructure to instrument the Spring Boot startup in various places where the vanilla Spring application context has no reach.

Here are a few places worth instrumenting:

  • the spring boot application events during the startup phase
  • server startup
  • early startup phase (when the application context is not even instantiated)
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

1 participant