-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move sentry init to separate sentry package
- Loading branch information
1 parent
8a2d51e
commit f60a04c
Showing
2 changed files
with
20 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package sentry | ||
|
||
import ( | ||
"log" | ||
"os" | ||
|
||
"github.com/getsentry/sentry-go" | ||
) | ||
|
||
func init() { | ||
err := sentry.Init(sentry.ClientOptions{ | ||
Dsn: os.Getenv("SENTRY_DSN"), | ||
Environment: os.Getenv("ENVIRONMENT"), | ||
EnableTracing: true, | ||
TracesSampleRate: 1.0, | ||
}) | ||
if err != nil { | ||
log.Fatalf("sentry.Init: %v", err) | ||
} | ||
} |