yhs0092 commented on PR #4752: URL: https://github.com/apache/servicecomb-java-chassis/pull/4752#issuecomment-2746637518
As the WebSocket stream is bi-directional and may contain multiple messages and orders, it's necessary to record the actions done during it's lifecycle, including users code receiving messages and notification from underlying websocket connection, and the messages sent by the users code to underlying websocket connection. Currently, the format of accesslog and requestlog is like below: `invocation type|microserviceQualifiedOperationId|the start time of an action|traceId|connectionId|action type|the queue time of the action|the time cost of the action in millisec|the name of thread that running the action|data size` explanation: - The "action" mentioned above means all kinds of messages, notifications, orders that users code sending to underlying websocket connection and the underlying websocket connection sending to users code. - Only the messaging actions carry data, so for the other kinds of actions, the `data size` is always `0`. - As the notifications sent by the underlying websocket connections are scheduled to a business ThreadPool to run, so there is `the queue time of the action`. accesslog: ``` PRODUCER|client.bridge-chatroom.login|2025-03-22T18:21:52.664+0800|67de8e8ca1b19f5f|67de8e8c74cfe824|ON_MESSAGE_TEXT|0|0|group0-1-thread-2|22 PRODUCER|client.bridge-chatroom.login|2025-03-22T18:21:52.666+0800|67de8e8ca1b19f5f|67de8e8c74cfe824|DO_SEND_TEXT|0|1|group0-1-thread-24|35 PRODUCER|client.bridge-chatroom.login|2025-03-22T18:21:52.666+0800|67de8dfceb10a399|67de8dfdb3c87a85|DO_SEND_TEXT|0|1|group0-1-thread-22|35 ``` requestlog: ``` CONSUMER|server-websocket.chatroom.login|2025-03-22T18:22:39.053+0800|67de8dfceb10a399|67de8dfcfce1b618|DO_SEND_TEXT|0|0|group0-1-thread-11|22 CONSUMER|server-websocket.chatroom.login|2025-03-22T18:22:39.056+0800|67de8dfceb10a399|67de8dfcfce1b618|ON_MESSAGE_TEXT|0|0|group0-1-thread-10|35 CONSUMER|server-websocket.chatroom.login|2025-03-22T18:22:39.056+0800|67de8ebbf0695681|67de8ebba4077c6a|ON_MESSAGE_TEXT|0|0|group0-1-thread-13|35 ``` -- 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]
