Adds an actuator Web endpoint for invoking async-profiler.

Currently, this actuator is "half baked" (it has a TODO for code duplicate and commented out @ConditionalOnClass annotation), yet it has already proven to be very useful "in field", when used as a custom actuator in our projects. Also, async-profiler has some built in MXBean capabilities, so, probably exposing them as a JMX endpoint would be appropriate.

This pull request is opened in hopes that #23988 could be reopened and someone from Spring Boot team could pick it up and elaborate.

Comment From: pivotal-cla

@andris-rauda Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@andris-rauda Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@andris-rauda Thank you for signing the Contributor License Agreement!

Comment From: wilkinsona

Thanks for the PR, @andris-rauda.

Unfortunately, we still feel that there's too much complexity here and no clear consensus on how the async profiler would be used as an actuator endpoint. Until there's a clear consensus, we don't feel that we can provide built-in support for it in Spring Boot's actuator as it will either be overly complex or unlikely to meet a large of portion of our users' needs.

This feels to me like something that would be better maintained as an external add-on to Spring Boot where it can evolve more rapidly and react to community feedback without the backwards compatibility constraints that comes with being part of Spring Boot itself.