Skip to content

Commit

Permalink
log failure (#6108)
Browse files Browse the repository at this point in the history
  • Loading branch information
tejal29 authored Jun 29, 2021
1 parent a66f869 commit af8aa31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/skaffold/instrumentation/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ func exportMetrics(ctx context.Context, filename string, meter skaffoldMeter) er
for _, m := range meters {
createMetrics(ctx, m)
}
p.Stop(ctx)
if err := p.Stop(ctx); err != nil {
logrus.Debugf("error uploading metrics: %s", err)
logrus.Debugf("writing to file %s instead", filename)
b, _ = json.Marshal(meters)
return ioutil.WriteFile(filename, b, 0666)
}
logrus.Debugf("metrics uploading complete in %s", time.Since(start).String())

if fileExists {
Expand Down

0 comments on commit af8aa31

Please sign in to comment.