Skip to content

fix(metrics): unconfigured heartbeat reports Warning not Online - #700

Open
MrBeldum wants to merge 1 commit into
singnet:masterfrom
MrBeldum:fix/694-unconfigured-heartbeat-warning
Open

MrBeldum wants to merge 1 commit into
singnet:masterfrom
MrBeldum:fix/694-unconfigured-heartbeat-warning

Conversation

@MrBeldum

Copy link
Copy Markdown

Description

Unconfigured heartbeat types ("" / "none") no longer claim Online from a TCP accept. They report Warning with NOT_SERVING so consumers can tell an unchecked service from a verified one. Explicit "tcp" still uses tcpPingService.

Fixes #694.

Changes

  • GetHeartbeat: route "none"/"" away from tcpPingService; keep "tcp" on the dial path
  • Tests for accept-only listeners (unconfigured → Warning, tcp → Online) plus HTTP path still Online
  • Update TestHeartbeatHandler expectation to match the unconfigured Warning status

Interface changes

Daemon heartbeat JSON status for unconfigured types is now "Warning" instead of a false "Online". gRPC health Check accordingly returns non-SERVING for those configs (same as any non-Online status today).

Test plan

  • go test ./metrics/ -count=1

Empty/"none" heartbeat types previously fell through to tcpPingService and
reported Online whenever a TCP accept succeeded. A wedged service can still
accept connections, so that signal was indistinguishable from a real check.

Report Warning (and NOT_SERVING) for unconfigured types; keep explicit "tcp"
on the dial path. Fixes singnet#694.
@MrBeldum

Copy link
Copy Markdown
Author

@StephenLReed @semyon-dev This addresses #694: unconfigured heartbeat types ("" / "none") now report Warning/NOT_SERVING instead of a false Online from a TCP accept.

Fork CI (build/test/Sonar) is action_required and needs a maintainer approval to run. Happy to adjust if the Warning vs Online contract should look different.

@MrBeldum MrBeldum changed the title Issue 694 fix(metrics): unconfigured heartbeat reports Warning not Online Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heartbeat reports Online/SERVING for a service that accepts TCP but cannot serve (unconfigured heartbeat path)

1 participant