Open jonatan-ivanov opened 3 years ago
The activeProfiles
is already exposed in the /env
endpoint.
Good point, today I was implementing it and I realized that if I don't set the active profiles property but set spring.profiles.default
, then environment.getActiveProfiles()
will be empty and the profle I set for default will be used. I think on the info endpoint it would be more useful to return the "effectively used profiles" instead of the value of environment.getActiveProfiles()
. Something like this I guess:
String[] getEffectiveProfiles() {
return ObjectUtils.isEmpty(environment.getActiveProfiles()) ? environment.getDefaultProfiles() : environment.getActiveProfiles();
}
Uptime is already a metric as well - I guess it really belongs there because you don't expect info to change over time.
I think using data that can change over time should be ok on the info endpoint, e.g.: current time (to detect clock skew issues), uptime (to see if the app was restarted or not), even the cpu count can change over time (because of cgroups).
I think the same about data that we have metrics for, e.g.: jvm version info. I think they can be used in different use-cases and the user should decide if they want one or the other or both.
This is a placeholder issue to group smaller tasks together to provide better Observability support for Spring Boot users.
Info enhancements
StartupInfoLogger
with some of these detailsSee:
Health enhancements
Spring Security enhancements
/whoami
endpoint: show principal and granted authoritiesThe list is still in progress and very likely to evolve in the near future.