if you have a bean named statusHealthIndicator (a bit contrived) or you add a detail named status (much more likely) then bad things happen:
{
"status" : "UP",
"diskSpace" : {
"status" : "UP",
"total" : 499046809600,
"free" : 126894542848,
"threshold" : 10485760
},
"dataSource" : {
"status" : "UP",
"database" : "HSQL Database Engine",
"hello" : 1
},
"status" : {
"status" : "UP",
"status" : "Oops"
}
}
Note the duplicate status keys at both levels.
The possibility of clashes could be removed by separating the details (aggregated indicators or individual health details):
{
"status" : "UP",
"details" : {
"diskSpace" : {
"status" : "UP",
"details" : {
"total" : 499046809600,
"free" : 126893486080,
"threshold" : 10485760
}
},
"dataSource" : {
"status" : "UP",
"details" : {
"database" : "HSQL Database Engine",
"hello" : 1
}
},
"status" : {
"status" : "UP",
"details" : {
"status" : "Oops"
}
}
}
}
if you have a bean named
statusHealthIndicator(a bit contrived) or you add a detail namedstatus(much more likely) then bad things happen:{ "status" : "UP", "diskSpace" : { "status" : "UP", "total" : 499046809600, "free" : 126894542848, "threshold" : 10485760 }, "dataSource" : { "status" : "UP", "database" : "HSQL Database Engine", "hello" : 1 }, "status" : { "status" : "UP", "status" : "Oops" } }Note the duplicate
statuskeys at both levels.The possibility of clashes could be removed by separating the details (aggregated indicators or individual health details):
{ "status" : "UP", "details" : { "diskSpace" : { "status" : "UP", "details" : { "total" : 499046809600, "free" : 126893486080, "threshold" : 10485760 } }, "dataSource" : { "status" : "UP", "details" : { "database" : "HSQL Database Engine", "hello" : 1 } }, "status" : { "status" : "UP", "details" : { "status" : "Oops" } } } }