Add support for crash reporting via sentry and change the send_crash_reports key

This commit is contained in:
Arturo Filastò 2018-06-29 15:29:05 +02:00
commit d88764aa34
7 changed files with 72 additions and 19 deletions

View file

@ -5,6 +5,8 @@ import (
"io/ioutil"
"sync"
"github.com/apex/log"
"github.com/ooni/probe-cli/internal/crashreport"
"github.com/ooni/probe-cli/utils"
"github.com/pkg/errors"
)
@ -39,6 +41,10 @@ func ParseConfig(b []byte) (*Config, error) {
if err := c.Validate(); err != nil {
return nil, errors.Wrap(err, "validating")
}
if c.Advanced.SendCrashReports == false {
log.Info("Disabling crash reporting.")
crashreport.Disabled = true
}
return &c, nil
}