Business Value
Operators need to distinguish a healthy MCP notification stream from an unsupported, rejected, disconnected, or stalled backend stream without relying on log searches.
Current behavior
The composite session opens one Streamable HTTP GET notification stream per initialized backend. Stream setup failures and non-success responses are returned to sendToBackendsFiltered, where they are logged as failed to collect messages from MCP backend. When every backend stream ends, the client-facing stream stays open for gateway heartbeats and route-level tool-change notifications.
The existing MCP metrics cover method counts, request and initialization duration, capabilities, and progress notifications. They do not expose whether a backend notification stream opened, is active, closed normally, returned an unsupported status such as 405, or failed.
A client-facing SSE connection can therefore look healthy while every upstream backend notification stream has ended.
Suggested behavior
Add backend-scoped metrics for:
- stream open attempts and outcomes;
- currently active streams;
- normal close or cancellation;
- unsupported/no-stream responses such as 204, 405, or accepted responses with no stream;
- transport and HTTP failures, including the status class where available;
- stream lifetime.
Tests should cover one healthy stream alongside one rejected or closed backend stream, plus the case where all backend streams end while the gateway keeps the client-facing heartbeat stream open.
Business Value
Operators need to distinguish a healthy MCP notification stream from an unsupported, rejected, disconnected, or stalled backend stream without relying on log searches.
Current behavior
The composite session opens one Streamable HTTP GET notification stream per initialized backend. Stream setup failures and non-success responses are returned to
sendToBackendsFiltered, where they are logged asfailed to collect messages from MCP backend. When every backend stream ends, the client-facing stream stays open for gateway heartbeats and route-level tool-change notifications.The existing MCP metrics cover method counts, request and initialization duration, capabilities, and progress notifications. They do not expose whether a backend notification stream opened, is active, closed normally, returned an unsupported status such as 405, or failed.
A client-facing SSE connection can therefore look healthy while every upstream backend notification stream has ended.
Suggested behavior
Add backend-scoped metrics for:
Tests should cover one healthy stream alongside one rejected or closed backend stream, plus the case where all backend streams end while the gateway keeps the client-facing heartbeat stream open.