fix: summarize GrpcClientChannel telemetry diagnostics - #10721
Conversation
Review by github-manager-botSummaryThis PR replaces raw Changes Reviewed
Assessment✅ Correctness — Logic is sound. Null checks are in place. The summary correctly uses ✅ Performance — No concerns. The summary method is lightweight and only called in error paths. ✅ Tests — Good coverage including null input, producer-only, consumer-only, and combined settings scenarios. Tests verify that sensitive resource names do not appear in the summary output. ✅ Compatibility — No public API changes. Internal helper methods are package-private. SuggestionThe This can be addressed in a follow-up; the current PR is clean on its own. Overall: Looks good. 👍 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10721 +/- ##
=============================================
- Coverage 48.62% 48.52% -0.11%
+ Complexity 13692 13667 -25
=============================================
Files 1381 1381
Lines 101464 101493 +29
Branches 13187 13190 +3
=============================================
- Hits 49337 49247 -90
- Misses 46142 46235 +93
- Partials 5985 6011 +26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Replaces raw Settings protobuf object logging with compact summaries in GrpcClientChannel, preventing potentially sensitive data (topic names, group names) from appearing in logs.
Findings
- [Info]
proxy/src/main/java/.../GrpcClientChannel.java— The newsummarizeSettings()method is clean and well-scoped. Good use ofhasPublishing()/hasSubscription()guards before accessing counts. - [Info]
proxy/src/main/java/.../GrpcClientChannel.java:110—getAttributeLength()is a simple null-safe helper; consider usingStringUtils.length(attr)from Apache Commons if already on the classpath to avoid a custom utility. - [Info] Cross-PR duplication — The identical
summarizeSettings()method appears in 3 PRs (#10721, #10719, #10717) acrossGrpcClientChannel,GrpcClientSettingsManager, andClientActivity. Consider extracting a shared utility (e.g.,SettingsUtils.summarize(Settings)) to avoid maintenance burden if the summary format needs to evolve.
Suggestions
- Consider a shared
SettingsUtilsclass for the duplicatedsummarizeSettings()logic across the 3 related PRs.
Verdict
LGTM. Clean sanitization change with good test coverage.
Automated review by github-manager-bot
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Replaces raw Settings protobuf in error logs with a summarizeSettings() that logs only clientType, publishingTopicCount, and subscriptionCount. Also replaces raw attribute string with its length in the parse error path.
Findings
- [Info] GrpcClientChannel.java:91 — Error log now includes clientId for correlation and a settings summary instead of the full protobuf. Good for debugging without log noise.
- [Info] GrpcClientChannel.java:110 — Using
getAttributeLength(attr)instead of the raw string in the parse error log is a good simplification. - [Info] GrpcClientChannel.java:113-123 —
summarizeSettings()is clean and null-safe.
Cross-repo Note
The same summarizeSettings() pattern appears in PRs #10719 and #10717. Consider extracting to a shared utility after all three merge.
Automated review by github-manager-bot
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Defensive fix with proper validation and test coverage. LGTM.
Automated review by github-manager-bot
abdcc75 to
a9f0ab0
Compare
Summary
GrpcClientChannelSettings conversion and Telemetry writes.Validation
mvn -q -pl proxy -am -Dtest=GrpcClientChannelTest -DfailIfNoTests=false testCloses #10720
Closes #10672