mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
client/tailscale: add LocalClient.IncrementMetric func
A #cleanup to add a func to utilize the already-present "/localapi/v0/upload-client-metrics" localapi endpoint. Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:

committed by
Sonia Appasamy

parent
c17a817769
commit
8e63d75018
@@ -1458,10 +1458,9 @@ func (h *Handler) serveUploadClientMetrics(w http.ResponseWriter, r *http.Reques
|
||||
return
|
||||
}
|
||||
type clientMetricJSON struct {
|
||||
Name string `json:"name"`
|
||||
// One of "counter" or "gauge"
|
||||
Type string `json:"type"`
|
||||
Value int `json:"value"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"` // one of "counter" or "gauge"
|
||||
Value int `json:"value"` // amount to increment metric by
|
||||
}
|
||||
|
||||
var clientMetrics []clientMetricJSON
|
||||
|
Reference in New Issue
Block a user