-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(rpc): reduce verbosity in subscriber notification logs #2028
Conversation
Replace detailed subscription object display with a simple list of client names in notification logs. This significantly reduces log verbosity while maintaining essential information such as block hash, block number, and client identifiers. Before this change, logs were showing the entire internal structure of subscription objects, resulting in extremely verbose logs that were difficult to read and analyze. Now, logs only show the client names without any internal implementation details. This change improves log readability and reduces resource consumption in production environments, addressing feedback that logs were excessively verbose. Tested with multiple simultaneous clients to ensure essential information is preserved even with a large number of subscribers.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Streamline the code for extracting client names in RPC subscription logging by removing unnecessary line breaks and using a more concise iterator chain. This change maintains the previous logging functionality while improving code readability and reducing visual complexity. The modifications affect three different subscription notification scenarios: - Pending transaction notifications - New block header notifications - Log event notifications No functional changes are introduced, only code formatting and simplification.
Replace detailed subscription object display with a concise client summary in notification logs. This change: 1. Significantly reduces log verbosity by removing internal implementation details 2. Groups clients by type (banking, issuing, stratus, etc.) and shows only the count 3. Formats output as "type: count" for easy reading 4. Maintains essential information like block hash and number Before this change, logs were showing the entire internal structure of subscription objects, resulting in extremely verbose logs. Now, logs show a concise summary of clients that is both informative and readable. This change improves log readability and reduces resource consumption in production environments, addressing feedback that logs were excessively verbose. Tested with multiple simultaneous clients to ensure essential information is preserved even with a large number of subscribers.
Clean up unnecessary whitespace in RPC subscription logging code across multiple notification scenarios. This change: - Removes extra blank lines in client type counting logic - Maintains existing functionality without altering the core implementation - Improves code readability by reducing visual noise
…thod Introduce a new `get_client_type` method to centralize and simplify client type extraction logic in RPC subscription notifications. This change: - Removes repeated client type identification code across different notification scenarios - Uses a more concise method to extract client type from the client string - Improves code maintainability by centralizing type extraction logic - Reduces code duplication in subscription notification handling
Final benchmark: Git Info:
Configuration:
Leader Stats: Follower Stats: Plots: |
User description
Replace detailed subscription object display with a simple list of client names in notification logs. This significantly reduces log verbosity while maintaining essential information such as block hash, block number, and client identifiers.
Before this change, logs were showing the entire internal structure of subscription objects, resulting in extremely verbose logs that were difficult to read and analyze. Now, logs only show the client names without any internal implementation details.
This change improves log readability and reduces resource consumption in production environments, addressing feedback that logs were excessively verbose.
Tested with multiple simultaneous clients to ensure essential information is preserved even with a large number of subscribers.
PR Type
Enhancement
Description
Reduce log verbosity in subscriber notifications
Replace subscription object display with client names
Improve readability of logs for pending transactions
Enhance logging for new blocks and logs
Changes walkthrough 📝
rpc_subscriptions.rs
Refactor RPC subscription logging for improved clarity and reduced
verbosity
src/eth/rpc/rpc_subscriptions.rs
interested_subs
tosubscribers
)