chore(zetaclient): demote ChainParams enumeration noise to debug#4608
chore(zetaclient): demote ChainParams enumeration noise to debug#4608morde08 wants to merge 1 commit into
Conversation
Two log lines fire on every UpdateAppContext tick for every chain in the registry, generating ~4M warns/week with no actionable signal: - "skipping unsupported chain" (zetaclient/orchestrator/contextupdater.go) - "chain does not have according ChainParams present; skipping" (zetaclient/context/app.go) These are config-driven enumeration over a static chain list, not runtime warnings. Demote both from Warn to Debug. Real warns (mempool congestion, chain list changes at runtime, invalid chain params with error) remain at Warn. Expected impact: ~4M log lines/wk removed from Datadog ingestion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR downgrades two warning-level logs to debug level during chain registry updates and chain enumeration: missing ChangesLogging Level Adjustments
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
WarntoDebug:skipping unsupported chain(zetaclient/orchestrator/contextupdater.go)chain does not have according ChainParams present; skipping(zetaclient/context/app.go)Why
Both fire on every
UpdateAppContexttick for every chain in the registry — config-driven enumeration over a mostly-static chain list, not runtime warnings. In Datadog over the last 7d these accounted for ~4M warn lines/wk across the fleet (skipping unsupported chainalone: 3,103/day per client). RealWarns in this code path are preserved: chain list changes at runtime, deleted chains, invalid chain params with an error, mempool congestion.Test plan
go test ./zetaclient/context/... ./zetaclient/orchestrator/...— all passgo build ./zetaclient/...service:zetaclientd status:warn @msg:"skipping unsupported chain"drops to ~0 in Datadog🤖 Generated with Claude Code
Note
Low Risk
Logging-only change with no behavior or control-flow impact; operational alerts that still use Warn remain in place.
Overview
Reduces zetaclient log noise by demoting two recurring enumeration messages from
WarntoDebug:skipping unsupported chainincontextupdater.goandchain does not have according ChainParams present; skippinginapp.go.Both run on every
UpdateAppContexttick for chains that are expected to be skipped (unsupported or missing params), so they were inflating fleet warn volume without signaling new failures. Comments document that intent; real warns in this path (runtime chain list changes, deleted chains, invalid chain params, mempool congestion) are unchanged.Reviewed by Cursor Bugbot for commit a0c9bf4. Configure here.
Summary by CodeRabbit
Greptile Summary
This PR demotes two log lines from
WarntoDebuglevel in the zetaclient's chain-params enumeration path to reduce high-volume log noise in production. The change is well-scoped and preserves all actionableWarn-level logs in the same code paths.zetaclient/orchestrator/contextupdater.go, the"skipping unsupported chain"message is demoted toDebugsince it fires on everyUpdateAppContexttick for each unsupported chain in the registry.zetaclient/context/app.go, the"chain does not have according ChainParams present; skipping"message is similarly demoted; genuine runtime warnings (chain list changes, invalid params with errors) remain atWarn.Confidence Score: 5/5
Safe to merge — the only changes are log level demotions with no effect on business logic or control flow.
Both changed lines are pure observability adjustments:
.Warn()becomes.Debug()with no surrounding logic touched. Actionable warnings in the same code paths (chain list runtime changes, invalid param validation errors) remain atWarn. The added comments accurately explain the rationale.No files require special attention.
Important Files Changed
"skipping unsupported chain"from Warn to Debug with an explanatory comment; no logic changes."chain does not have according ChainParams present; skipping"from Warn to Debug with an explanatory comment; no logic changes.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[UpdateAppContext tick] --> B[Fetch chainParams from ZetaCore] B --> C{For each ChainParam} C --> D{IsSupported?} D -- No --> E[logger.Debug: 'skipping unsupported chain'] D -- Yes --> F{IsZetaChain?} E --> C F -- Yes --> C F -- No --> G{Validate params} G -- Error --> H[logger.Warn: 'skipping invalid chain parameters'] G -- OK --> I[Add to freshParams] H --> C I --> C C --> J[updateChainRegistry] J --> K{Chain list changed?} K -- Yes --> L[logger.Warn: 'chain list changed at runtime'] K --> M{Each chain has ChainParams?} M -- Missing & not Zeta --> N[logger.Debug: 'chain does not have ChainParams; skipping'] M --> O[Update registry]Reviews (1): Last reviewed commit: "chore(zetaclient): demote ChainParams en..." | Re-trigger Greptile