0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/modules
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
..
caddyhttp reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
caddypki acmeserver: Support custom CAs from Caddyfile 2021-02-02 17:23:52 -07:00
caddytls Improve security warnings 2021-02-16 14:05:31 -07:00
filestorage httpcaddyfile: Minor fixes to parsing storage options 2020-05-01 09:34:32 -06:00
logging logging: Remove logfmt encoder (close #3575) 2021-01-07 14:29:19 -07:00
metrics metrics: allow disabling OpenMetrics negotiation (#3944) 2020-12-30 11:44:02 -07:00
standard metrics: Initial integration of Prometheus metrics (#3709) 2020-09-17 12:01:20 -06:00