Skip to content

Conversation

@quiet-node
Copy link
Contributor

@quiet-node quiet-node commented Nov 4, 2025

Description

This PR introduces configurable SDK logging to help debug consensus node timeouts on mainnet. It adds a new SDK_LOG_LEVEL environment variable that allows independent control of the Hedera SDK's logging level, separate from the global application log level. This enables fine-tuned debugging of SDK operations without flooding the main application logs.

The implementation creates a child logger from the global logger that inherits parent properties while using the SDK-specific log level configuration.

Log Volume Impact

Additional logs per eth_sendRawTransaction transaction:

SDK_LOG_LEVEL Extra Logs Breakdown
debug 15 logs 6 (transaction execution) + 9 (receipt retrieval)
trace 21 logs 8 (transaction execution) + 13 (receipt retrieval)

Related issue(s)

Fixes #4576

Testing Guide

  1. Set the SDK_LOG_LEVEL environment variable to different levels (trace, debug, info, warn, error)
  2. Start the relay service and observe that SDK logs appear at the configured level
  3. Verify that SDK logs are tagged with "name": "sdk-client" for easy identification
  4. Confirm that global application logs continue to use the LOG_LEVEL setting independently
  5. Run the test suite: SDK Logger Configuration to verify all test cases pass

Changes from original design (optional)

N/A

Additional work needed (optional)

N/A

Checklist

  • I've assigned an assignee to this PR and related issue(s) (if applicable)
  • I've assigned a label to this PR and related issue(s) (if applicable)
  • I've assigned a milestone to this PR and related issue(s) (if applicable)
  • I've updated documentation (code comments, README, etc. if applicable)
  • I've done sufficient testing (unit, integration, etc.)

@quiet-node quiet-node added this to the 0.74.0 milestone Nov 4, 2025
@quiet-node quiet-node self-assigned this Nov 4, 2025
@quiet-node quiet-node requested review from a team as code owners November 4, 2025 23:11
@quiet-node quiet-node requested a review from acuarica November 4, 2025 23:11
@quiet-node quiet-node added the enhancement New feature or request label Nov 4, 2025
@quiet-node quiet-node linked an issue Nov 4, 2025 that may be closed by this pull request
6 tasks
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Test Results

 20 files  ±0  269 suites  ±0   22m 40s ⏱️ +43s
778 tests ±0  774 ✅ +1  4 💤 ±0  0 ❌  - 1 
794 runs  ±0  790 ✅ +1  4 💤 ±0  0 ❌  - 1 

Results for commit a352dd5. ± Comparison against base commit db87e7f.

♻️ This comment has been updated with latest results.

natanasow
natanasow previously approved these changes Nov 7, 2025
@quiet-node quiet-node force-pushed the 4576-implement-enhanced-sdk-logging-to-debug-consensus-node-timeouts-on-mainnet branch from 99cb798 to bb51163 Compare November 7, 2025 18:52
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 4576-implement-enhanced-sdk-logging-to-debug-consensus-node-timeouts-on-mainnet branch from f52e36b to a352dd5 Compare November 11, 2025 19:47
@quiet-node quiet-node merged commit 5c444b0 into main Nov 12, 2025
47 checks passed
@quiet-node quiet-node deleted the 4576-implement-enhanced-sdk-logging-to-debug-consensus-node-timeouts-on-mainnet branch November 12, 2025 16:45
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##             main    #4578   +/-   ##
=======================================
  Coverage   95.41%   95.42%           
=======================================
  Files         128      128           
  Lines       20668    20680   +12     
  Branches     1760     1762    +2     
=======================================
+ Hits        19721    19733   +12     
  Misses        928      928           
  Partials       19       19           
Flag Coverage Δ
config-service 98.82% <100.00%> (+<0.01%) ⬆️
relay 90.86% <100.00%> (+<0.01%) ⬆️
server 88.93% <ø> (ø)
ws-server 98.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/config-service/src/services/globalConfig.ts 100.00% <100.00%> (ø)
packages/relay/src/lib/clients/sdkClient.ts 95.87% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

quiet-node added a commit that referenced this pull request Nov 18, 2025
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Enhanced SDK Logging to Debug Consensus Node Timeouts on Mainnet

4 participants