client/web: track web client initializations

Updates tailscale/corp#13775

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
pull/9017/head
Sonia Appasamy 1 year ago committed by Sonia Appasamy
parent 947def7688
commit 09e5e68297

@ -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
}

Loading…
Cancel
Save