It would be nice if you could limit the output of /actuator/configprops
to a specific value in the same way that you can with the environment endpoint.
Comment From: onobc
@philwebb I picked this up and wanted to run my thoughts on filtering by you before getting too much further. My plan is to:
Filter by prefix: /actuator/configprops?prefix=<config-props-prefix-goes-here>
Filter by config props simple classname: /actuator/configprops/<config-props-simple-classname-goes-here>
Examples:
- /actuator/configprops?prefix=spring.kafka
- /actuator/configprops/ServerProperties
Comment From: snicoll
I think it's worth discussing how to filter the data. I don't know what Phil had in mind but if we want to do something similar to /env
, I think the selector should be the id of the entity in the result. Unfortunately, this id isn't super easy to remember. I don't think we should be using SeverProperties
, in particular, as you may have two cases with the same name.
Given that the prefix is easier to remember (and something that's easier to resonate than a class name), my vote would be the first option in your examples.
Comment From: onobc
Unfortunately, this id isn't super easy to remember.
Yeh that is exactly what I ran into when I started w/ that as the filter.
in particular, as you may have two cases with the same name.
Yes that is true. In that case they would both show up as well w/ what prefix they are mapped to. I added this filter by asking myself what would I want to filter by. Prefix for sure. The properties class is the next thing I think of - KafkaProperties
is one I end up looking at multiple times a day for example. Because I seem to find my way into those configprops classes in my editor I am familiar w/ the class name so it seemed like a good candidate. For me, they are both valuable.
Also, I have some screenshots to show the filtered results if that helps at all.
Comment From: philwebb
Thanks for looking at this @bono007. I added the issue as a note to myself so it's a bit light on details.
I think most users will probably want to filter on the property prefix, since that's the most user-facing value. I would suggest trying /actuator/configprops/<prefix>
and then filtering the results so that only configuration properties starting with the given prefix are shown.
Comment From: onobc
@snicoll @philwebb I will get the updates in w/in the next 24-48 hrs
Comment From: onobc
@snicoll @philwebb I pivoted the merge request to filter only by prefix and also added the docs.
Comment From: philwebb
Thanks @bono007!
Comment From: wilkinsona
Closing in favour of #24718.