File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ func mainWithExitCode() flags.ExitCode {
270270 telemetryClient := telemetrygrpc .NewTelemetryServiceClient (grpcConn )
271271 _ , err = telemetryClient .ReportPanic (context .Background (), & telemetrypb.ReportPanicRequest {
272272 Stderr : buf .String (),
273- Metadata : getTelemetryMetadata (int (presentCores )),
273+ Metadata : getTelemetryMetadata (int (presentCores ), cmd . ProcessState . ExitCode () ),
274274 })
275275 if err != nil {
276276 log .Errorf ("failed to call ReportPanic(): %v" , err )
@@ -559,7 +559,7 @@ func mainWithExitCode() flags.ExitCode {
559559 return flags .ExitSuccess
560560}
561561
562- func getTelemetryMetadata (numCPU int ) map [string ]string {
562+ func getTelemetryMetadata (numCPU int , processExitCode int ) map [string ]string {
563563 r := make (map [string ]string )
564564 var si sysinfo.SysInfo
565565 si .GetSysInfo ()
@@ -569,6 +569,7 @@ func getTelemetryMetadata(numCPU int) map[string]string {
569569 r ["go_arch" ] = runtime .GOARCH
570570 r ["kernel_release" ] = si .Kernel .Release
571571 r ["cpu_cores" ] = strconv .Itoa (numCPU )
572+ r ["process_exit_code" ] = strconv .Itoa (processExitCode )
572573
573574 return r
574575}
You can’t perform that action at this time.
0 commit comments