Open sam-myers opened 11 months ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
[X] functions/packages/config/config.go
✅ Commit 7c3f47b
• Add a new field to the Config struct for the Sentry DSN. This should be a string field named `SentryDSN` that is populated by the `SENTRY_DSN` environment variable.
[X] functions/search/go.mod
✅ Commit 31139c1
• Add `github.com/getsentry/sentry-go` as a dependency in the `go.mod` file.
[X] functions/search/main.go
✅ Commit 222142a
• Import the `github.com/getsentry/sentry-go` package at the top of the file.
• Initialize the Sentry SDK in the `main` function using the `sentry.Init` function. The DSN should be retrieved from the config struct.
• In the error handling sections of the `main` function, use the `sentry.CaptureException` function to send error logs to Sentry.
[X] functions/spotify-rss/go.mod
✅ Commit 05e7622
• Add `github.com/getsentry/sentry-go` as a dependency in the `go.mod` file.
[X] functions/spotify-rss/main.go
✅ Commit dcb3ee7
• Import the `github.com/getsentry/sentry-go` package at the top of the file.
• Initialize the Sentry SDK in the `main` function using the `sentry.Init` function. The DSN should be retrieved from the config struct.
• In the error handling sections of the `main` function, use the `sentry.CaptureException` function to send error logs to Sentry.
I have finished reviewing the code for completeness. I did not find errors for sweep/add-sentry-error-reporting
.
.
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
In
functions/packages/config/config.go
, add a new value for Sentry DSN, which is to be populated by the environment variableSENTRY_DSN
.For both
functions/search
andfunctions/spotify-rss
, addgithub.com/getsentry/sentry-go
as a dependency. Use the Sentry SDK to send error logs when either function encounters an unrecoverable error, for example when a 500 error is returned.Also, suggest improvements on how to integrate Sentry properly.
Checklist
- [X] ``functions/packages/config/config.go`` ✅ Commit7c3f47b
- [X] ``functions/search/go.mod`` ✅ Commit31139c1
- [X] ``functions/search/main.go`` ✅ Commit222142a
- [X] ``functions/spotify-rss/go.mod`` ✅ Commit05e7622
- [X] ``functions/spotify-rss/main.go`` ✅ Commitdcb3ee7