Aias00 opened a new issue, #7837: URL: https://github.com/apache/shenyu/issues/7837
## Goal Remove avoidable complete-message JSON processing and log volume from Admin's WebSocket send path, including when its INFO logging is disabled. Preserve useful operational diagnostics and existing message delivery. ## Current processing [WebsocketCollector.send(namespaceId,...):336](https://github.com/apache/shenyu/blob/04f7c2e8b7d282f14510157a9ab0bfaab538ecac/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketCollector.java#L326-L357) passes maskSensitive(message) as an INFO argument. Java evaluates this method before the logger checks its level. [maskSensitive():428–460](https://github.com/apache/shenyu/blob/04f7c2e8b7d282f14510157a9ab0bfaab538ecac/shenyu-admin/src/main/java/org/apache/shenyu/admin/listener/websocket/WebsocketCollector.java#L428-L460) parses the entire message into maps/lists, recursively traverses it and serializes another complete JSON string. It is also called before the send path discovers that no matching sessions are present. Async logging does not remove this caller-side work. ## Scope and acceptance - [ ] Log event metadata (namespace, group/type, item count, measured size and appropriate bounded diagnostics) for normal delivery rather than an entire payload. Reuse metadata available to the publisher instead of reparsing a large JSON solely to recover it. - [ ] Any opt-in detailed diagnostic path must remain safely redacted and lazy/level-guarded. Do not optimize by logging the unredacted message. - [ ] Verify that disabled INFO/detailed diagnostics do not invoke full-payload parsing/redaction/serialization. Preserve validation and delivery behavior even when logs are disabled. - [ ] Exercise ordinary sends, initial synchronization, empty data, absent sessions and malformed diagnostic input. Keep request/sequence handling and send failure handling unchanged. - [ ] Measure caller-thread CPU/allocation, log bytes/sec, queue pressure and sync/business p99 at equal traffic and log destinations for 1k/10k+ payloads. ## Related work #7643 (closed) covered routine match-success diagnostics and the gateway receiver's full-payload logging. The current Admin collector still performs the explicit whole-message redaction/INFO operation above; this is the residual producer-side processing path, not a request to re-add an async appender or redo the already-fixed receiver log. #7832 owns compact wire DTOs; logging should not undo their gains by creating more complete message copies. ## Baseline and validation boundary Reviewed Apache ShenYu `2.7.2-SNAPSHOT`, master `04f7c2e8b7d282f14510157a9ab0bfaab538ecac`. Source inspection confirms the processing described here; no before/after load benchmark has been run and no fixed performance gain is claimed. Use #7650's reproducible benchmark contract: warm JVM, identical configuration/resources, controlled payload shapes, repeated runs, CPU/allocation/GC, synchronization convergence and business-request p99 during sync. No new production dependency is required for this proposal. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
