()
| 155 | } |
| 156 | |
| 157 | func sendDiagnosticPing() bool { |
| 158 | ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) |
| 159 | defer cancelFn() |
| 160 | |
| 161 | rpcClient := wshclient.GetBareRpcClient() |
| 162 | isOnline, err := wshclient.NetworkOnlineCommand(rpcClient, &wshrpc.RpcOpts{Route: "electron", Timeout: 2000}) |
| 163 | if err != nil || !isOnline { |
| 164 | return false |
| 165 | } |
| 166 | clientId := wstore.GetClientId() |
| 167 | usageTelemetry := telemetry.IsTelemetryEnabled() |
| 168 | wcloud.SendDiagnosticPing(ctx, clientId, usageTelemetry) |
| 169 | return true |
| 170 | } |
| 171 | |
| 172 | func setupTelemetryConfigHandler() { |
| 173 | watcher := wconfig.GetWatcher() |
no test coverage detected