feature/featuretags: make usermetrics modular

Saves ~102 KB from the min build.

Updates #12614

Change-Id: Ie1d4f439321267b9f98046593cb289ee3c4d6249
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-10-06 12:02:16 -07:00
committed by Brad Fitzpatrick
parent ea8e991d69
commit d816454a88
17 changed files with 97 additions and 31 deletions
+3 -1
View File
@@ -99,7 +99,6 @@ var handler = map[string]LocalAPIHandler{
"status": (*Handler).serveStatus,
"update/check": (*Handler).serveUpdateCheck,
"upload-client-metrics": (*Handler).serveUploadClientMetrics,
"usermetrics": (*Handler).serveUserMetrics,
"watch-ipn-bus": (*Handler).serveWatchIPNBus,
"whois": (*Handler).serveWhoIs,
}
@@ -126,6 +125,9 @@ func init() {
Register("dns-osconfig", (*Handler).serveDNSOSConfig)
Register("dns-query", (*Handler).serveDNSQuery)
}
if buildfeatures.HasUserMetrics {
Register("usermetrics", (*Handler).serveUserMetrics)
}
}
// Register registers a new LocalAPI handler for the given name.