Add support for crash reporting via sentry and change the send_crash_reports key
This commit is contained in:
parent
b8dff783e1
commit
d88764aa34
7 changed files with 72 additions and 19 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue