spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Add support for custom actuator health status mapping in EurekaHealthCheckHandler

Open yashdotdev13 opened this issue 8 months ago • 1 comments

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

yashdotdev13 avatar Apr 02 '26 12:04 yashdotdev13

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.

yashdotdev13 avatar Apr 03 '26 02:04 yashdotdev13