From 09e5e68297288d325975ed2462a9898b45eae849 Mon Sep 17 00:00:00 2001 From: Sonia Appasamy Date: Tue, 22 Aug 2023 13:15:08 -0400 Subject: [PATCH] client/web: track web client initializations Updates tailscale/corp#13775 Signed-off-by: Sonia Appasamy --- client/web/web.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/web/web.go b/client/web/web.go index f08603ac0..37df7a644 100644 --- a/client/web/web.go +++ b/client/web/web.go @@ -79,6 +79,7 @@ func NewServer(devMode bool, lc *tailscale.LocalClient) (s *Server, cleanup func csrfProtect := csrf.Protect(csrfKey()) s.apiHandler = csrfProtect(&api{s: s}) } + s.lc.IncrementCounter(context.Background(), "web_client_initialization", 1) return s, cleanup } @@ -306,6 +307,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { s.servePostNodeUpdate(w, r) return default: + s.lc.IncrementCounter(context.Background(), "web_client_page_load", 1) s.serveGetNodeData(w, r, user) return }