Skip to content

fix: summarize ClientActivity telemetry and settings logs - #10717

Open
Aias00 wants to merge 2 commits into
apache:developfrom
Aias00:fix/proxy-client-settings-sync-log-summary
Open

fix: summarize ClientActivity telemetry and settings logs#10717
Aias00 wants to merge 2 commits into
apache:developfrom
Aias00:fix/proxy-client-settings-sync-log-summary

Conversation

@Aias00

@Aias00 Aias00 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace raw client Settings and Telemetry exception logs in ClientActivity with bounded diagnostic summaries.
  • Preserve client ID, operation context and failure cause without logging protobuf payload content.

Validation

mvn -q -pl proxy -am -Dtest=ClientActivityTest -DfailIfNoTests=false test

Closes #10716
Closes #10676

Copilot AI review requested due to automatic review settings July 31, 2026 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@RockteMQ-AI

Copy link
Copy Markdown
Contributor

Review by github-manager-bot

Summary

This PR replaces raw Settings protobuf object logging in ClientActivity during cross-proxy settings sync. The debug log now outputs a summary (clientType, publishingTopicCount, subscriptionCount) instead of the full Settings object.

Changes Reviewed

  • proxy/src/main/java/.../ClientActivity.java — added summarizeSettings() helper, updated log statement
  • proxy/src/test/java/.../ClientActivityTest.java — added test verifying no resource names leak into summary

Assessment

✅ Correctness — Logic is correct. Null check and optional field guards are properly implemented.

✅ Performance — No concerns. Debug-level logging, lightweight summary method.

✅ Tests — Good coverage. Test verifies both producer and consumer settings summaries exclude resource names, and null input returns "null".

✅ Compatibility — No public API changes. Package-private static method.

Suggestion

Same observation as #10721 and #10719: the summarizeSettings() pattern is now duplicated in 3 classes. A shared utility class would reduce maintenance burden and ensure consistency if the summary format needs to evolve.

Overall: Looks good. 👍

@codecov-commenter

codecov-commenter commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.66667% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.50%. Comparing base (293f588) to head (5214e17).

Files with missing lines Patch % Lines
.../rocketmq/proxy/grpc/v2/client/ClientActivity.java 41.66% 10 Missing and 4 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10717      +/-   ##
=============================================
- Coverage      48.62%   48.50%   -0.12%     
+ Complexity     13692    13653      -39     
=============================================
  Files           1381     1381              
  Lines         101464   101486      +22     
  Branches       13187    13191       +4     
=============================================
- Hits           49337    49227     -110     
- Misses         46142    46240      +98     
- Partials        5985     6019      +34     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by github-manager-bot

Summary

Replaces raw Settings protobuf logging with compact summaries in ClientActivity (the cross-proxy sync path), preventing sensitive data leakage in logs during settings synchronization.

Findings

  • [Info] proxy/src/main/java/.../activity/ClientActivity.java — Clean change. The summarizeSettings() method is identical to the ones in #10721 and #10719.
  • [Info] Cross-PR duplication — Same summarizeSettings() appears in 3 classes. If the summary format needs to include additional fields later (e.g., access type, subscription expressions), all 3 copies must be updated in sync. A shared utility would eliminate this risk.
  • [Info] Test coverage is comprehensive, including the getAttributeLength() null-safety check.

Suggestions

  • Consider a shared SettingsUtils or ProxyLoggingUtils class to consolidate the duplicated summary logic.

Verdict

LGTM. Consistent sanitization across the proxy logging paths.


Automated review by github-manager-bot

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by github-manager-bot

Summary

Replaces raw Settings protobuf in the "save client settings sync from other proxy" debug log with a summarizeSettings() summary.

Findings

  • [Info] ClientActivity.java:93-101 — summarizeSettings() implementation is identical to PRs #10721 and #10719. Same summarization logic, same fields.
  • [Info] ClientActivity.java:610 — Debug log correctly uses summary instead of full protobuf. The channelInfo is still logged in full which is fine for debug level.
  • [Info] Test coverage validates that sensitive data (like full subscription details) is not exposed in the summary.

Cross-repo Note

Third instance of the same summarizeSettings() method. After all three PRs merge, extracting to a shared utility class would be a good follow-up.


Automated review by github-manager-bot

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Defensive fix with proper validation and test coverage. LGTM.


Automated review by github-manager-bot

@Aias00
Aias00 force-pushed the fix/proxy-client-settings-sync-log-summary branch from 809b45c to 5214e17 Compare August 15, 2026 07:24
@Aias00 Aias00 changed the title [ISSUE #10716] Summarize synced client settings logs fix: summarize ClientActivity telemetry and settings logs Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Proxy client settings sync log prints full gRPC Settings [Bug] Proxy gRPC telemetry exception logs full client TelemetryCommand

4 participants