[P2][Logs] Make invariant and ignore logs actionable
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 56
- Forks
- 63
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 34
Description
Parent issue: #4691
Intent
Messages such as this should not happen and ignore it state a conclusion without showing the invariant, evidence, or impact. That weakens the diagnostic value of the log even when the event is real. This task rewrites invariant and ignore logs so they are actionable during triage.
Modification points
- For invariant-violation logs, include the violated expectation, the observed value, the impact scope, and the action taken.
- For ignore logs, explain why the event is safe to ignore, what object was dropped, and which current epoch or state made the decision safe.
- Remove templates that only express surprise or dismissal without evidence.
Entry points
downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go:254downstreamadapter/eventcollector/dispatcher_stat.go:688downstreamadapter/eventcollector/dispatcher_stat.go:521downstreamadapter/eventcollector/dispatcher_stat.go:615downstreamadapter/eventcollector/dispatcher_stat.go:681
Done criteria
- Readers can tell from the log alone whether the event is an expected drop, a recoverable inconsistency, or a correctness risk.
this should not happenandignore itstyle messages are replaced with evidence-based explanations.- The remaining logs consistently include expectation, observation, impact, and action.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the listed log sites in downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go and downstreamadapter/eventcollector/dispatcher_stat.go, especially the specified lines, to understand each event's context. Replace invariant and ignore messages with explanations covering expectation, observation, impact, and action. Done means readers can distinguish expected drops, recoverable inconsistencies, and correctness risks from the logs alone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, observability-sre
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100