feat(logs): record timeout length and add request logging knob #7
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/request-logging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two logging changes:
Timeouts now name the duration that expired, at every site one can
surface: the per-attempt retry log, the 502 body returned to the client,
and discovery probe failures. describeErr matches on net.Error.Timeout(),
which covers both shapes that actually occur -- the transport's
ResponseHeaderTimeout and discovery's context deadline. Non-timeout
errors pass through verbatim, since there is no timeout to blame.
Successful forwards can now be logged via log_requests: true in config
or --log-requests, off by default because it is a line per completion.
The knob rides in a new proxy.Options struct rather than another
positional argument to New.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com