spring-cloud / spring-cloud/spring-cloud-netflix

Allow custom health check status mapping

Open
#3,975 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Java
Stars
5k
Forks
2.5k
Avg merge
1d 2h
Merged PRs (30d)
10

Description

With Spring Boot Actuator health check endpoint, we can use management.endpoint.health.status.http-mapping.<status> to map a custom status to an HTTP status code. But for Eureka integration, any custom status would map to UNKNOWN status in Eureka since the mapping is not configurable (https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaHealthCheckHandler.java#L61-L64). It would be nice if we can map custom statuses to UP/DOWN/OUT_OF_SERVICE via properties similar to the health check endpoint HTTP status mapping.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with EurekaHealthCheckHandler.java at the referenced status-mapping logic and review the existing Spring Boot Actuator health HTTP-mapping properties described in the issue. Determine how configuration should map custom health statuses to Eureka's UP, DOWN, or OUT_OF_SERVICE values, then verify that the configured mappings are applied instead of treating custom statuses as UNKNOWN.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.