File tree Expand file tree Collapse file tree 3 files changed +95
-0
lines changed
Expand file tree Collapse file tree 3 files changed +95
-0
lines changed Original file line number Diff line number Diff line change 11package main
22
33import (
4+ "log"
45 "os"
56
67 "github.com/depot/cli/internal/build"
78 "github.com/depot/cli/pkg/cmd/root"
9+ "github.com/getsentry/sentry-go"
810)
911
1012func main () {
@@ -13,6 +15,15 @@ func main() {
1315}
1416
1517func runMain () int {
18+ if os .Getenv ("DEPOT_ERROR_TELEMETRY" ) != "0" {
19+ err := sentry .Init (sentry.ClientOptions {
20+ Dsn :
"https://[email protected] /6271909" ,
21+ })
22+ if err != nil {
23+ log .Fatalf ("sentry.Init: %s" , err )
24+ }
25+ }
26+
1627 buildVersion := build .Version
1728 buildDate := build .Date
1829
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ require (
1111 github.com/docker/distribution v2.8.0+incompatible
1212 github.com/docker/docker v20.10.7+incompatible
1313 github.com/docker/go-units v0.4.0
14+ github.com/getsentry/sentry-go v0.13.0
1415 github.com/moby/buildkit v0.10.0-rc2.0.20220308185020-fdecd0ae108b
1516 github.com/morikuni/aec v1.0.0
1617 github.com/pkg/errors v0.9.1
You can’t perform that action at this time.
0 commit comments