spring-cloud-netflix
spring-cloud-netflix copied to clipboard
Add support for custom actuator health status mapping in EurekaHealthCheckHandler
This PR introduces configurable mapping between Spring Boot Actuator health statuses and Eureka InstanceStatus.
Currently, custom actuator statuses are mapped to UNKNOWN by default. This change allows users to define mappings via configuration:
eureka.client.status.mapping.*
Example: eureka.client.status.mapping.fatal=OUT_OF_SERVICE
Key points:
- Supports custom actuator health statuses
- Case-insensitive mapping
- Preserves existing default behavior as fallback
- Maintains backward compatibility
Tests:
- Added unit tests for custom status mapping
- Verified null safety handling
- All existing tests pass successfully
Fixes #4551
You're right — that was unintended. I've reverted the unrelated documentation changes and kept the PR focused only on the status mapping feature. Thanks for pointing that out.