[P4][Logs] Replace large zap.Any payloads on hot paths with compact fields
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
Some hot-path logs include large objects, arrays, or raw payloads through zap.Any. Those logs are expensive to encode, expensive to store, and still hard to read because they lack a concise summary. This task replaces large payload dumps on default paths with compact structured fields.
Modification points
- Replace large
zap.Anyfields onInfoandWarnlogs with scalar fields and small samples. - Keep raw events, config blobs, or object dumps only behind
Debugor a dedicated diagnostics mode. - Ensure the retained fields answer the first triage question directly instead of forcing the reader to inspect a large payload.
Entry points
downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go:162downstreamadapter/eventcollector/dispatcher_stat.go:521downstreamadapter/eventcollector/dispatcher_stat.go:670logservice/txnutil/lock_resolver.go:56logservice/logpuller/subscription_client.go:1012logservice/logpuller/subscription_client.go:1057logservice/logpuller/subscription_client.go:1072logservice/logpuller/region_request_worker.go:298
Done criteria
- Default logs no longer include large arrays, raw event objects, or config blobs on the targeted hot paths.
- The remaining fields make the incident understandable without inspecting a full dump.
- Full payload detail is still available through lower-level or diagnostics-only logging.
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
Review the listed call sites in dispatcher_orchestrator.go, dispatcher_stat.go, lock_resolver.go, subscription_client.go, and region_request_worker.go, starting with the specified log statements and their hot-path data. Identify which Info and Warn fields use large zap.Any payloads, then verify that default logs retain concise triage fields while full payloads remain available only through lower-level or diagnostics-only logging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100