Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightly clean up Sentry event logging. #385

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

sengi
Copy link
Contributor

@sengi sengi commented Aug 20, 2023

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:

Base automatically changed from sengi/testability to main August 21, 2023 10:51
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant