| 3 | import "github.com/getsentry/sentry-go" |
| 4 | |
| 5 | func initSentry(sentryDsn string, version string) error { |
| 6 | return sentry.Init(sentry.ClientOptions{ |
| 7 | Debug: false, |
| 8 | Dsn: sentryDsn, |
| 9 | Release: "cloudquery@" + version, |
| 10 | Transport: sentry.NewHTTPSyncTransport(), |
| 11 | ServerName: "oss", // set to "oss" on purpose to avoid sending any identifying information |
| 12 | // https://docs.sentry.io/platforms/go/configuration/options/#removing-default-integrations |
| 13 | Integrations: func(integrations []sentry.Integration) []sentry.Integration { |
| 14 | var filteredIntegrations []sentry.Integration |
| 15 | for _, integration := range integrations { |
| 16 | if integration.Name() == "Modules" { |
| 17 | continue |
| 18 | } |
| 19 | filteredIntegrations = append(filteredIntegrations, integration) |
| 20 | } |
| 21 | return filteredIntegrations |
| 22 | }, |
| 23 | }) |
| 24 | } |