status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.92k stars 984 forks source link

Configure status-go to use Sentry #21656

Open igor-sirotin opened 5 days ago

igor-sirotin commented 5 days ago

Feature Request

What's need to be done:

  1. When building status-go, set these environment variables:
    • SENTRY_CONTEXT_NAME="status-mobile"
    • SENTRY_CONTEXT_VERSION=<mobile-version-here>
  2. Set requests.InitializeApplication.sentryDSN parameter to the value stored in SENTRY_DSN_STATUS_MOBILE environment variable. It will be provided by CI in release builds. You can use any other env var variable name, but let infra team know in https://github.com/status-im/status-go/issues/6114.

User Story

As a developer, I want to receive Sentry crash reports for the panics in status-go.

Acceptance Criteria

  1. Run status-mobile
  2. Make some action that leads to a panic in status-go (just hardcode something for testing purposes) NOTE: for now only these panics are reported:
    • In /mobile/status.go endpoints
    • In any goroutines
  3. Able to see the crash report at sentry.infra.status.im

Notes

  1. Sentry is integrated here (not merged yet):
  2. Desktop example here:
  3. CI is not yet configured to provide environment variables. We're doing it.
  4. To get access to Sentry, ping @markoburcul