Skip to content

Conversation

@AlexFalappa
Copy link
Contributor

@AlexFalappa AlexFalappa commented Sep 26, 2019

It might make sense to add values hints and any provider to management.endpoints.web.exposure.include and management.endpoints.web.exposure.exclude configuration properties.

The hinted values are the basic available actuators endpoint ids plus *.

This way IDEs could help building the comma separated list of actuator endpoints to hide/expose providing completion on endpoints names. For example I have added such support to NetBeans SpringBoot plugin in commit AlexFalappa/nb-springboot@3fb9478

Such type of hint is similar to that for management.health.status.order configuration property of type List<String>.

Feel free to also backport to 2.1.x line if it makes sense.

Add values hints and 'any' provider to management.endpoints.web.exposure.include and management.endpoints.web.exposure.exclude configuration properties
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 26, 2019
@snicoll
Copy link
Member

snicoll commented Sep 26, 2019

Thanks for the PR @AlexFalappa. You're right that we could provide completion for endpoint IDs there. This list can apply to JMX exposure as well which makes me think there's quite a repetition in values (and endpoints defined outside of Spring Boot could not be documented that way). This makes me wonder how we can improve the metadata syntax to avoid the duplication.

@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Sep 26, 2019
@philwebb
Copy link
Member

External jars can also contribute endpoints so we need to find a way for the list to be extended by them.

@AlexFalappa
Copy link
Contributor Author

@snicoll you are right the same would plainly apply to the JMX endpoint exposure.

@philwebb would merging of hints lists suffice ? Looking at the code in org.springframework.boot.configurationmetadata.SimpleConfigurationMetadataRepository.include(ConfigurationMetadataRepository repository) metadata definitions are not overrided, the first one wins.

If list merging were in place external jars could simply define in additional-spring-configuration-metadata.json their additional hint values under management.endpoints.web.exposure.include (and other properties as well).

Just thinking out loud, I haven't carefully thought of all the implications of configuration metadata merge-instead-of-replace logic.

@snicoll
Copy link
Member

snicoll commented Sep 27, 2019

@philwebb absolutely, that's what I meant by "and endpoints defined outside of Spring Boot could not be documented that way"

Just thinking out loud, I haven't carefully thought of all the implications of configuration metadata merge-instead-of-replace logic.

We'd have to do something like that but we can't reuse the existing mechanism IMO. Other IDEs have dedicated code and it's not a requirement to use SimpleConfigurationMetadataRepository. I guess it's a contribution mechanism we have to investigate.

Also added value hints for management.endpoints.jmx.exposure.include and management.endpoints.jmx.exposure.exclude configuration properties.
@AlexFalappa
Copy link
Contributor Author

AlexFalappa commented Sep 27, 2019

Just added hints values for JMX endpoints as well if you intend to go down the repeated values road in the short term and think about a more comprehensive solution after.

Squash at will.

@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
@snicoll
Copy link
Member

snicoll commented Sep 28, 2019

Thanks again for the PR and the update @AlexFalappa. We've come to the conclusion that the current situation is not ideal and decided to remove hints from our metadata altogether.

We'd like to tackle this problem differently, see #18408

@snicoll snicoll closed this Sep 28, 2019
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed for: team-meeting An issue we'd like to discuss as a team to make progress status: waiting-for-triage An issue we've not yet triaged labels Sep 28, 2019
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.

4 participants