mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-20 05:56:56 +00:00
fix(target-health): ignore context-caused federation errors
mcpFederatedToolsList's fan-out and mcpFederatedToolsCall both derive their outbound context from r.Context(). A client cancel (context.Canceled) or the shared fan-out deadline expiring (context.DeadlineExceeded) is not evidence about a server's own health, so neither is recorded any more, mirroring recordTargetProxyHealth's own client-cancel rule. A server that is genuinely hung is still caught by the active probe sweep or its own per-server proxy health. Claude-Session: https://claude.ai/code/session_01EebV5jyWvYocByNQ3oss1w
This commit is contained in:
@@ -1893,7 +1893,12 @@ plugin's config.
|
||||
`POST /mcp`'s `tools/list` fan-out and `tools/call` record a failure
|
||||
only when the outbound call itself fails (`err != nil` from the
|
||||
backend call) — a JSON-RPC-level `error` in the backend's own
|
||||
response still counts as reachable, since the server answered.
|
||||
response still counts as reachable, since the server answered. A
|
||||
context-caused failure (the caller canceling, or the shared fan-out
|
||||
deadline expiring) records nothing at all, the same client-cancel
|
||||
rule the per-server proxy above applies; a genuinely hung server is
|
||||
still caught by the active probe sweep or its own per-server proxy
|
||||
health.
|
||||
- **Active probes are opt-in** (`targetHealth.enabled: true`) and lazy:
|
||||
no timer, no background goroutine running on its own. A probe sweep
|
||||
is triggered by `/metrics`, `GET /admin/api/targets`, `GET
|
||||
|
||||
Reference in New Issue
Block a user