Skip to content

Conversation

ldebello
Copy link

Hi,

Currently at work I have created a simple endpoint for exposing Diagnostic MBean from actuator, so I decided to contribute to it with this change.

Functionality:

  • Expose operations from Diagnostic MBean.
  • Get details for one specific operation.
  • Execute an operation with or without parameters.
  • Also this endpoint allows to get some resources (This is because some operations like JFR, generate a file for the result, anyway there is a mechanism to filter which kind of resources can be fetched).

Screenshots

Get Operations
image

Get Operation Details
image

Execute Operation
image

If you consider this can be useful but it requires more changes I can work on that but if you consider this is not a valid use case for actuator endpoints just close the pull request.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 20, 2019
@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Sep 21, 2019
@philwebb
Copy link
Member

Thanks very much for the pull-request @ldebello. We plan to discuss this a little more as team when we meet at Spring One in a few weeks. Unfortunately we probably won't be able to merge this in time for 2.2, but we'll review it and consider the options for 2.3.

@philwebb philwebb added for: team-meeting An issue we'd like to discuss as a team to make progress and removed for: team-attention An issue we'd like other members of the team to review labels Sep 27, 2019
@ldebello
Copy link
Author

@philwebb thanks for the update, let me know if I can help in something

@ldebello
Copy link
Author

Hi,

I would like to know if there is something from my side that I can do to help with this

@wilkinsona
Copy link
Member

@ldebello Thanks for the offer, but we don't need anything from you at the moment. As @philwebb indicated above, we'll review and consider this for 2.3 in due course.

@ldebello
Copy link
Author

Awesome, thanks :)

*/
private int computeParameterPosition(Descriptor parameterDescriptor) {
Integer parameterPosition = (Integer) parameterDescriptor.getFieldValue(ARGUMENT_POSITION_DESCRIPTOR);
return (parameterPosition != -1) ? parameterPosition : 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(parameterPosition == -1) ? 0 : parameterPosition maybe more readable

@wilkinsona wilkinsona removed the for: team-meeting An issue we'd like to discuss as a team to make progress label Jan 31, 2020
@ldebello
Copy link
Author

ldebello commented Feb 28, 2020

Hi team. Do I need to update my branch to allow you to review this or you can review and if this is ok do the update branch later?

@wilkinsona
Copy link
Member

Hi, @ldebello. Thanks again for the offer. We don't need anything from you at the moment.

The core team have discussed this a bit. We're currently leaning towards not merging the changes but we haven't reached a final decision. The general problem of exposing MBeans over HTTP is something that we'd prefer to be solved by Jolokia for which Spring Boot already has auto-configuration. For those that want access specifically to the diagnostics MBean but do not want to use Jolokia, our current feeling is that support would be better maintained as a third-party starter rather than in Spring Boot itself.

I'll flag this for team attention so that we can discuss this again sometime soon and hopefully reach a final decision.

@wilkinsona wilkinsona added the for: team-attention An issue we'd like other members of the team to review label Mar 3, 2020
@ldebello
Copy link
Author

ldebello commented Mar 3, 2020

Awesome, thanks for the reply. Before sending the PR I thought the same about using jolokia, but I thought it could be more useful to expose this in a different way for diagnostics tools. I also thought about exposing it as starter project but I believed as contribution could be more valuable but I can create a starter for this :). If the team arrives to a conclusion please let me know and I can close the PR and create the starter-project.

@wilkinsona
Copy link
Member

We discussed this one today and I'm afraid that we concluded that we don't want to merge and support it ourselves. Thanks again for your PR and for your understanding of our decision. If you do create a third-party starter with this functionality, we'd be happy to add it to the list of community starters.

@wilkinsona wilkinsona closed this Mar 5, 2020
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants