Skip to content

Missing session ID in error log of WebFluxMcpSessionTransport #5858

@ArpanC6

Description

@ArpanC6

Problem

In WebFluxSseServerTransportProvider, the inner class
WebFluxMcpSessionTransport had a TODO comment in the doOnError handler:
// TODO log with sessionid

The error was being logged without any session identifier, making it
difficult to trace which session caused the error in production.

Fix

Added a sessionId field to WebFluxMcpSessionTransport with a
setSessionId() method. The session ID is set immediately after session
creation in handleSseConnection(). The doOnError handler now logs the
session ID along with the error message.

Why

Proper session-aware logging is essential for debugging and monitoring
in production environments with multiple concurrent sessions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions