-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lightly clean up Sentry event logging.
We're still quite some way from using the Sentry API as intended, but this at least makes our usage a bit less weird/buggy and more readable. - Send events to Sentry asynchronously, instead of blocking. - Allow up to 2 s to finish sending events to Sentry on exit. - Manage the lifecycle of the sentry.Client, Hub and Scope objects the way we're supposed to, rather than reinitialising Sentry every time we send an event. - Remove the unexported methods on our (still somewhat sketchy) ReportableError type; these weren't helping readability. Relevant docs: - https://docs.sentry.io/platforms/go/usage/ - https://docs.sentry.io/platforms/go/enriching-events/scopes/ - https://docs.sentry.io/platforms/go/concurrency/ - https://docs.sentry.io/platforms/go/panics/ - https://docs.sentry.io/platforms/go/guides/http/ - https://github.com/getsentry/sentry-go/blob/master/_examples/http/main.go
- Loading branch information
Showing
2 changed files
with
27 additions
and
36 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