mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-21 22:08:59 +00:00
.
This commit is contained in:
parent
3be0c9ecd9
commit
1e66ebd8b3
@ -1,7 +1,11 @@
|
||||
package main
|
||||
|
||||
import "github.com/up9inc/mizu/cli/cmd"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/up9inc/mizu/cli/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Running mizu...")
|
||||
cmd.Execute()
|
||||
}
|
||||
|
@ -8,12 +8,13 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var TELEMETRY_URL = "https://us-east4-up9-prod.cloudfunctions.net/mizu-telemetry"
|
||||
|
||||
func ReportRun(cmd string, args interface{}) {
|
||||
if Branch != "main" {
|
||||
rlog.Debugf("reporting only on main branch")
|
||||
return
|
||||
}
|
||||
url := "https://us-east4-up9-prod.cloudfunctions.net/mizu-telemetry"
|
||||
|
||||
argsBytes, _ := json.Marshal(args)
|
||||
argsMap := map[string]string{"telemetry_type": "mizu_execution", "cmd": cmd, "args": string(argsBytes), "component": "mizu_cli"}
|
||||
@ -21,7 +22,7 @@ func ReportRun(cmd string, args interface{}) {
|
||||
|
||||
jsonValue, _ := json.Marshal(argsMap)
|
||||
|
||||
if resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonValue)); err != nil {
|
||||
if resp, err := http.Post(TELEMETRY_URL, "application/json", bytes.NewBuffer(jsonValue)); err != nil {
|
||||
rlog.Debugf("error sending telemtry err: %v, response %v", err, resp)
|
||||
} else {
|
||||
rlog.Debugf("Successfully reported telemetry")
|
||||
|
Loading…
Reference in New Issue
Block a user