caddy/modules/caddyhttp
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
..
caddyauth caddyauth: Use structured log 2020-12-03 11:33:55 -07:00
encode caddyfile: Refactor unmarshaling of module tokens 2021-01-05 14:39:30 -07:00
fileserver fileserver: Fix "go up" links in browse listings (closes #3942) 2020-12-30 08:05:01 -07:00
headers headers: Fix Caddyfile parsing with request matcher (#3892) 2020-11-30 10:20:30 -07:00
map map: Add missing json struct tag 2021-01-16 09:56:06 -07:00
push headers: Support default header values in Caddyfile with '?' (#3807) 2020-11-20 12:38:16 -07:00
requestbody Revert "requestbody: Allow overwriting remote address" 2021-01-19 18:43:01 -07:00
reverseproxy reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
rewrite rewrite: Use RawPath instead of Path (fix #3596) (#3918) 2021-01-11 09:18:53 -07:00
standard push: Implement HTTP/2 server push (#3573) 2020-07-20 12:28:40 -06:00
templates templates: Add fileExists and httpError template actions 2021-01-11 13:49:20 -07:00
app.go reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
autohttps.go httpcaddyfile: Fix default issuers when email provided 2021-02-02 16:17:26 -07:00
caddyhttp.go httpcaddyfile: Configure servers via global options (#3836) 2020-11-23 12:46:50 -07:00
celmatcher.go caddyhttp: Add support to resolve DN in CEL expression (#3608) 2020-07-31 15:06:30 -06:00
celmatcher_test.go caddyhttp: Add support to resolve DN in CEL expression (#3608) 2020-07-31 15:06:30 -06:00
errors.go ci: Use golangci's github action for linting (#3794) 2020-11-22 14:50:29 -07:00
marshalers.go ci: Use golangci's github action for linting (#3794) 2020-11-22 14:50:29 -07:00
matchers.go caddyhttp: Support placeholders in header matcher values (close #3916) 2021-02-11 16:27:09 -07:00
matchers_test.go caddyhttp: Support placeholders in header matcher values (close #3916) 2021-02-11 16:27:09 -07:00
metrics.go metrics: Always track method label in uppercase (#3742) 2020-09-22 20:10:34 -06:00
metrics_test.go metrics: Fix panic when headers aren't written (#3737) 2020-09-21 13:42:47 -06:00
replacer.go reverseproxy: Add duration/latency placeholders (close #4012) (#4013) 2021-02-22 11:57:21 -07:00
replacer_test.go caddyhttp: New placeholder for PEM of client certificate (#3662) 2020-09-16 15:06:51 -06:00
responsewriter.go caddyhttp: Fix trailers when recording responses (fixes #3236) 2020-04-22 11:10:13 -06:00
routes.go metrics: Fix hidden panic while observing with bad exemplars (#3733) 2020-09-17 21:46:24 -06:00
server.go Minor comments 2020-12-02 13:27:08 -07:00
staticerror.go Fix some godocs 2020-04-11 09:01:40 -06:00
staticresp.go caddyhttp: Check for invalid subdirectives of static_response 2021-02-02 16:19:58 -07:00
staticresp_test.go Implement config adapters and beginning of Caddyfile adapter 2019-08-09 12:05:47 -06:00
subroute.go reverseproxy: Enable changing only the status code (close #2920) 2020-06-04 12:06:38 -06:00
vars.go caddyfile: Add support for vars and vars_regexp matchers (#3730) 2020-09-25 17:50:26 -06:00