Skip to content

Conversation

@wankai123
Copy link
Member

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

* [Break Change] `Health Check` make response 1 represents healthy, 0 represents unhealthy.
@wankai123 wankai123 added this to the 10.3.0 milestone Jun 30, 2025
@wankai123 wankai123 added backend OAP backend related. feature New feature labels Jun 30, 2025

This comment was marked as outdated.

@wankai123 wankai123 requested a review from Copilot June 30, 2025 08:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the health check implementation across several components to flip the healthy/unhealthy score such that a score of 1 represents healthy and 0 represents unhealthy. Key changes include updating the gauge metric description, modifying the HealthCheckMetrics implementation, and adjusting both the gRPC client health check and HTTP service behavior accordingly.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
telemetry-api/MetricsCreator.java Updates metric description for health check gauge
telemetry-api/HealthCheckMetrics.java Inverts gauge values to reflect healthy (1) and unhealthy (0)
query-graphql-plugin/query-protocol Update subproject commit reference
library-client/GRPCClient.java Adds health check scheduling and state handling
health-checker/HealthCheckerProvider.java Adjusts health check score evaluation logic
health-checker/HealthCheckerHttpService.java Updates HTTP service to return OK when score is 1
server-core/HealthStatus.java Updates comment to reflect the new healthy score
docs/en/setup/backend/backend-health-check.md Updates documentation to match the new health check semantics
docs/en/changes/changes.md Logs the breaking change in health check response values
Comments suppressed due to low confidence (1)

oap-server/server-telemetry/telemetry-api/src/main/java/org/apache/skywalking/oap/server/telemetry/api/MetricsCreator.java:56

  • The gauge description mentions a '-1 unknown' state which is not implemented in HealthCheckMetrics (only healthy (1) and unhealthy (0) are set). Consider updating the description to avoid confusion.
            Strings.lenientFormat("%s health check. 1 health, 0 not health, -1 unknown", name),

@wu-sheng wu-sheng merged commit 4430cf5 into apache:master Jun 30, 2025
335 of 337 checks passed
@wankai123 wankai123 deleted the health-check branch June 30, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants