spring-projects / spring-projects/spring-boot
Provide parseable version / details for actuator 'env' endpoint 'origin'
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
Similar to this: https://github.com/spring-projects/spring-boot/issues/11864
STS team would like to start parsing the information in the 'env' actuator endpoint. Just a quick look at this it seems pretty straightforward, except for what is perhaps the most interesting part of it (from our point of view). I.e. the 'origin' field which gives a hint about where the property value came from.
For example:
management.endpoints.web.exposure.include[0]: {
value: "env",
origin: "class path resource [application.yml]:6:11"
}
Or:
HOME: {
value: "/home/kdvolder",
origin: "System Environment Property "HOME""
}
It would be interesting to be able to offer some navigation support that helps user to open something like this in their IDE. So I suppose that means mainly the 'classpath resource' are of interest here.
So could we do something similar to what was done for handler methods? I.e. maybe something like this:
management.endpoints.web.exposure.include[0]: {
value: "env",
origin: "class path resource [application.yml]:6:11",
details: {
classpathResource: {
path: "application.yml",
line: 6,
col: 11
}
}
}
}
I suppose we could probably try to parse the "origin" string with some 'string.indexOf('[') etc. But I'm not really keen on doing that if it can be avoided.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the actuator env endpoint and the existing handler-method details approach referenced in the issue. Use the provided classpath-resource and system-environment examples to define the structured origin details, including path, line, and column, while preserving the existing origin information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100