hashgraph / hashgraph/solo-weaver

fix(daemon): emit HIP-1497 soak events on the logs channel, not JSONL-only

Open
#1,149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3
Forks
0
Avg merge
3d 5h
Merged PRs (30d)
47

Description

## Problem

HIP-1497 requires every daemon soak event on **both** channels — JSONL **and** logs (OTel). On `main`, 5 of the 6 soak events are emitted **JSONL-only** via `logMigrateEvent` in `internal/daemon/consensus/migration_monitor.go`, with no paired `logx.As()` structured line:

| Event | JSONL | logs |
|---|:--:|:--:|
| `SoakStarted` | ✓ | ✓ |
| `SoakCheck` | ✓ | ✗ |
| `CriterionMet` | ✓ | ✗ |
| `FleetThresholdReached` | ✓ | ✗ |
| `DecommissionTriggered` | ✓ | ✗ |
| `DecommissionCompleted` | ✓ | ✗ |

Only `SoakStarted` has an adjacent `logx.As().Info()` line. The others reach only the JSONL audit file, so anything consuming the OTel log stream (dashboards, alerting) never sees them.

## Fix

Add a paired `logx.As().().Str("reason", )...` line next to each `logMigrateEvent` call for the five events above (mirror the existing `SoakStarted` pattern), or centralize the dual-channel emit in `logMigrateEvent` itself so JSONL + logs stay in lockstep. Levels are all INFO, matching the JSONL side.

## Context

- Surfaced by the observability scan in hashgraph/solo-operator#1126 (daemon channel rules: JSONL + logs, no K8s events).
- Independent of the execute-phase epic #502 — this is shipped soak-monitor code and can be fixed on its own.

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 in internal/daemon/consensus/migration_monitor.go and inspect logMigrateEvent alongside the existing SoakStarted logx.As().Info() pattern. Account for the five listed soak events and verify that each emits an INFO log entry as well as its JSONL audit event, while preserving the daemon channel rules described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.