Skip to content

Commit 4570b74

Browse files
authored
update the URL for sending telemetry (#9395)
1 parent 1ca950d commit 4570b74

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

dgraph/cmd/zero/zero.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ func (s *Server) Init() {
9999
}
100100

101101
func (s *Server) periodicallyPostTelemetry() {
102+
const scarfBaseUrlFmt = "https://hypermode.gateway.scarf.sh/dgraph-deployments/%v/%v/%v/%v/%v"
103+
102104
// sleep so that a leader is elected by this time
103105
time.Sleep(time.Minute)
104106

@@ -121,8 +123,8 @@ func (s *Server) periodicallyPostTelemetry() {
121123
numTablets += len(g.GetTablets())
122124
}
123125

124-
url := fmt.Sprintf("https://dgraph.gateway.scarf.sh/%v/%v/%v/%v/%v",
125-
x.Version(), runtime.GOOS, numAlphas, len(ms.GetZeros()), numTablets)
126+
url := fmt.Sprintf(scarfBaseUrlFmt, x.Version(),
127+
runtime.GOOS, numAlphas, len(ms.GetZeros()), numTablets)
126128
glog.Infof("Posting Telemetry data to [%v]", url)
127129

128130
resp, err := http.Get(url)

0 commit comments

Comments
 (0)