GH-5858: Add session ID logging in WebFluxMcpSessionTransport error handler#5859
GH-5858: Add session ID logging in WebFluxMcpSessionTransport error handler#5859ArpanC6 wants to merge 2 commits intospring-projects:mainfrom
Conversation
…first one Signed-off-by: Arpan Chakraborty <chakrabortyarpan151@gmail.com>
…ansport error handler Signed-off-by: Arpan Chakraborty <chakrabortyarpan151@gmail.com>
anuragg-saxenaa
left a comment
There was a problem hiding this comment.
LGTM. Clean, targeted fix — WebFluxMcpSessionTransport now stores its sessionId for better error logging. The null check with sessionId in the catch block is exactly the right approach for MCP server debugging.
Thank you for the review. |
|
LGTM. Clean, targeted fix — WebFluxMcpSessionTransport now stores its sessionId for better error logging in production. The setSessionId() call placement in handleSseConnection() is correct and non-invasive. Ready to merge. |
anuragg-saxenaa
left a comment
There was a problem hiding this comment.
LGTM — session ID injection in doOnError handler is clean. The setSessionId() call after session creation is the correct placement. Changes are minimal and targeted (+17/-3 lines). Fixes the TODO comment and enables production debugging. Ready to merge.
anuragg-saxenaa
left a comment
There was a problem hiding this comment.
LGTM — session ID injection in doOnError handler is clean. setSessionId call after session creation is correct. Minimal and targeted +17/-3. Fixes TODO and enables production debugging. Ready to merge.
What
Added session ID logging in the
doOnErrorhandler ofWebFluxMcpSessionTransportand removed the TODO comment.Why
The
doOnErrorhandler was logging errors without any session identifier,making it impossible to trace which session caused the error in production
with multiple concurrent sessions.
A TODO comment existed:
// TODO log with sessionidHow
@Nullable String sessionIdfield toWebFluxMcpSessionTransportsetSessionId()methodsetSessionId()inhandleSseConnection()after session creationdoOnErrorto log the session ID with the error messageCloses #5858