Skip to content

Commit

Permalink
chore(sentry): Sentry opt out banner. (#5672) (#5727)
Browse files Browse the repository at this point in the history
Fixes DGRAPH-1689.

(cherry picked from commit eeb0dcb)
  • Loading branch information
parasssh authored Jun 24, 2020
1 parent a8bf7a5 commit cef19d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions dgraph/cmd/alpha/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ func run() {
defer x.FlushSentry()
x.ConfigureSentryScope("alpha")
x.WrapPanics()
x.SentryOptOutNote()
}
bindall = Alpha.Conf.GetBool("bindall")

Expand Down
1 change: 1 addition & 0 deletions dgraph/cmd/zero/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func run() {
defer x.FlushSentry()
x.ConfigureSentryScope("zero")
x.WrapPanics()
x.SentryOptOutNote()
}

x.PrintVersion()
Expand Down
8 changes: 8 additions & 0 deletions x/sentry_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ const (
dsnDevtest = "https://84c2ad450005436fa27d97ef72b52425@o318308.ingest.sentry.io/5208688"
)

// SentryOptOutNote - This is an opt out banner.
func SentryOptOutNote() {
glog.Infof("This instance of Dgraph will send anonymous reports of panics back " +
"to Dgraph Labs via Sentry. No confidential information is sent. These reports " +
"help improve Dgraph. To opt-out, restart your instance with the --enable_sentry=false " +
"flag. For more info, see https://dgraph.io/docs/howto/#data-handling.")
}

// InitSentry initializes the sentry machinery.
func InitSentry(ee bool) {
env = "prod-"
Expand Down

0 comments on commit cef19d1

Please sign in to comment.