Skip to content

Instrument SpringBootApplication for application startup metrics #22600

Closed
@bclozel

Description

@bclozel

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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions