mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
client/web: track web client initializations
Updates tailscale/corp#13775 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
parent
947def7688
commit
09e5e68297
@ -79,6 +79,7 @@ func NewServer(devMode bool, lc *tailscale.LocalClient) (s *Server, cleanup func
|
|||||||
csrfProtect := csrf.Protect(csrfKey())
|
csrfProtect := csrf.Protect(csrfKey())
|
||||||
s.apiHandler = csrfProtect(&api{s: s})
|
s.apiHandler = csrfProtect(&api{s: s})
|
||||||
}
|
}
|
||||||
|
s.lc.IncrementCounter(context.Background(), "web_client_initialization", 1)
|
||||||
return s, cleanup
|
return s, cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +307,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
s.servePostNodeUpdate(w, r)
|
s.servePostNodeUpdate(w, r)
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
|
s.lc.IncrementCounter(context.Background(), "web_client_page_load", 1)
|
||||||
s.serveGetNodeData(w, r, user)
|
s.serveGetNodeData(w, r, user)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user