See gh-37984
This commit is contained in:
Johnny Lim
2023-10-21 16:45:11 +09:00
committed by Moritz Halbritter
parent 6b8c340de0
commit b5d4983829
15 changed files with 29 additions and 40 deletions

View File

@@ -32,13 +32,11 @@ class MyHealthMetricsExportConfiguration(registry: MeterRegistry, healthEndpoint
}.strongReference(true).register(registry)
}
private fun getStatusCode(health: HealthEndpoint): Int {
return when (health.health().status) {
Status.UP -> 3
Status.OUT_OF_SERVICE -> 2
Status.DOWN -> 1
else -> 0
}
private fun getStatusCode(health: HealthEndpoint) = when (health.health().status) {
Status.UP -> 3
Status.OUT_OF_SERVICE -> 2
Status.DOWN -> 1
else -> 0
}
}