Basic Prometheus metrics #7

Merged
arch merged 6 commits from prometheus-metrics into main 2024-05-19 00:30:57 +01:00
Showing only changes of commit b6a5d6332d - Show all commits

View file

@ -482,15 +482,16 @@ WHERE id = $1 AND user_id = $2
func (s *Server) ShowPost(w http.ResponseWriter, r *http.Request) {
ui, _ := upsertUserInfo(r.Context(), s.db, s.lc, r.RemoteAddr)
var up *tailcfg.UserProfile
origin := "public"
if ui != nil {
up = ui.UserProfile
origin = "tailnet"
}
origin := "tailnet"
if valAny := r.Context().Value(privacyKey); valAny != nil {
if val, ok := valAny.(mixedCriticalityHandlerCtxKey); ok {
if val == isFunnel {
up = nil
origin = "public"
}
}
}