caddy/modules/caddyhttp/reverseproxy
Matt Holt 6722ae3a83
reverseproxy: Add duration/latency placeholders (close #4012) (#4013)
* reverseproxy: Add duration/latency placeholders (close #4012) (and #2268)

Adds 4 placeholders, one is actually outside reverse proxy though:

{http.request.duration} is how long since the server decoded the HTTP request (headers).
{http.reverse_proxy.upstream.latency} is how long it took a proxy upstream to write the response header.
{http.reverse_proxy.upstream.duration} is total time proxying to the upstream, including writing response body to client.
{http.reverse_proxy.duration} is total time spent proxying, including selecting an upstream and retries.

Obviously, most of these are only useful at the end of a request, like when writing response headers or logs.

See also: https://caddy.community/t/any-equivalent-of-request-time-and-upstream-header-time-from-nginx/11418

* Add new placeholders to documentation
2021-02-22 11:57:21 -07:00
..
fastcgi fastcgi: Set PATH_INFO to file matcher remainder as fallback (#3739) 2020-12-04 17:12:13 -07:00
caddyfile.go reverseproxy: Response buffering & configurable buffer size 2021-02-09 14:15:04 -07:00
command.go chore: Fix typo in reverse-proxy subcommand help message (#3513) 2020-06-22 00:40:54 -04:00
healthchecks.go reverseproxy: Caddyfile health check headers, host header support (#3948) 2021-01-04 11:26:18 -07:00
hosts.go reverseproxy: Fix dial placeholders, SRV, active health checks (#3780) 2020-10-13 10:35:20 -06:00
httptransport.go reverseproxy: Response buffering & configurable buffer size 2021-02-09 14:15:04 -07:00
reverseproxy.go reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
selectionpolicies.go reverseproxy: Minor lint fixes 2020-12-14 15:30:55 -07:00
selectionpolicies_test.go reverseproxy: Minor lint fixes 2020-12-14 15:30:55 -07:00
streaming.go ci: Use golangci's github action for linting (#3794) 2020-11-22 14:50:29 -07:00
streaming_test.go ci: Use golangci's github action for linting (#3794) 2020-11-22 14:50:29 -07:00