Prechádzať zdrojové kódy

feat: added os to stats

Torkel Ödegaard 8 rokov pred
rodič
commit
26ad025705
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      pkg/metrics/publish.go

+ 3 - 0
pkg/metrics/publish.go

@@ -4,6 +4,7 @@ import (
 	"bytes"
 	"bytes"
 	"encoding/json"
 	"encoding/json"
 	"net/http"
 	"net/http"
+	"runtime"
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
@@ -86,6 +87,8 @@ func sendUsageStats() {
 	report := map[string]interface{}{
 	report := map[string]interface{}{
 		"version": version,
 		"version": version,
 		"metrics": metrics,
 		"metrics": metrics,
+		"os":      runtime.GOOS,
+		"arch":    runtime.GOARCH,
 	}
 	}
 
 
 	statsQuery := m.GetSystemStatsQuery{}
 	statsQuery := m.GetSystemStatsQuery{}