diff options
| author | Jamal Carvalho <jamal@golang.org> | 2022-10-12 19:01:06 +0000 |
|---|---|---|
| committer | Jamal Carvalho <jamal@golang.org> | 2022-10-13 13:44:31 +0000 |
| commit | 93bb5d2a0f0272eafc698f9eff73a2bb7afedd2a (patch) | |
| tree | 9e576dc924408eaeabc5110e9291257d8c36df81 /internal/frontend/server.go | |
| parent | 873fb37c24799199f4b1e129bc425fa0490b1f8d (diff) | |
| download | go-x-pkgsite-93bb5d2a0f0272eafc698f9eff73a2bb7afedd2a.tar.xz | |
internal/frontend: add separate tag route for search page types
To improve monitoring of the latency of these pages we separate
the search modes into different request tags.
Change-Id: I3f0cf887b78fa3e6c065324bd5473433b963769e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/442555
TryBot-Result: kokoro <noreply+kokoro@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Diffstat (limited to 'internal/frontend/server.go')
| -rw-r--r-- | internal/frontend/server.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/frontend/server.go b/internal/frontend/server.go index ae96d2e4..bef46c4f 100644 --- a/internal/frontend/server.go +++ b/internal/frontend/server.go @@ -380,6 +380,13 @@ func TagRoute(route string, r *http.Request) string { tag += tab } } + if tag == "search" { + switch m := r.URL.Query().Get("m"); m { + case "symbol", "package", "vuln": + fmt.Println(tag, m) + tag += "-" + m + } + } return tag } |
