pkgsite/internal/middleware
Julie Qiu 6f80375784 internal/dcensus: add Latency
There are several places where we need to compute the latency
measurement for recording an opencensus measurement.

A dcensus.Latency function is added so that
we can ensure latency is being calculated in the same way for all
measurements.

Change-Id: Ic138f29106f88c9c468084816d8856e47bbd7cc2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247359
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-12 01:54:21 +00:00
..
accept_requests.go internal/middleware: account for entire URL in AcceptRequests 2020-08-21 19:50:52 +00:00
accept_requests_test.go internal/middleware: account for entire URL in AcceptRequests 2020-08-21 19:50:52 +00:00
betaRedirect.go internal/middleware: add option to redirect requests to beta.pkg.go.dev 2021-02-03 06:45:21 +00:00
betaRedirect_test.go internal/middleware: add option to redirect requests to beta.pkg.go.dev 2021-02-03 06:45:21 +00:00
caching.go internal/dcensus: add Latency 2021-06-12 01:54:21 +00:00
caching_test.go internal/frontend: do latest-major-version logic in main serving path 2021-02-19 18:55:45 +00:00
errorreporting.go internal/worker: downgrade proxy errors to warning level 2021-04-26 15:41:02 +00:00
errorreporting_test.go internal/middleware: allow bypassing error reporting 2021-02-12 18:13:13 +00:00
experiment.go internal/poller: package for polling and updating a value 2020-10-13 21:30:11 +00:00
experiment_test.go internal/middleware: remove ExperimentSource 2020-09-21 21:33:45 +00:00
iapheader.go internal/worker,middleware: validate IAP header 2020-09-23 19:46:24 +00:00
middleware.go internal/middleware,etl: add error reporting middleware 2020-03-27 16:46:47 -04:00
middleware_test.go internal/middleware: close http bodies in test code 2020-03-27 16:46:40 -04:00
panic.go all: rename module to golang.org/x/pkgsite 2020-04-23 16:18:43 +00:00
panic_test.go middleware,frontend: add a panic middleware 2020-03-27 16:46:46 -04:00
quota.go internal/middleware: remove LegacyQuota 2020-12-14 19:23:54 +00:00
quota_test.go internal/middleware,worker: fix staticcheck errors 2020-12-15 23:20:04 +00:00
requestlog.go internal/middleware: fix isRobot 2020-12-08 21:33:36 +00:00
requestlog_test.go internal/middleware: fix isRobot 2020-12-08 21:33:36 +00:00
secureheaders.go content,internal: prepare badge page for dark theme 2021-06-09 13:25:16 +00:00
secureheaders_test.go cmd,content,internal: create a flag to disable CSP 2020-09-15 14:45:44 +00:00
stats.go internal/middleware: support additional stats 2020-10-16 10:38:05 +00:00
stats_test.go internal/middleware: support additional stats 2020-10-16 10:38:05 +00:00
timeout.go internal/middleware: add a middleware package 2020-03-27 16:46:34 -04:00
timeout_test.go internal/middleware: close http bodies in test code 2020-03-27 16:46:40 -04:00