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

Configure Sentry for Mobile #21682

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Configure Sentry for Mobile #21682

wants to merge 10 commits into from

Conversation

ilmotta
Copy link
Contributor

@ilmotta ilmotta commented Nov 26, 2024

Fixes: #21656

Summary

In this PR we integrate Sentry and implement a feature flagged feature (disabled by default) to force crash the app using the function mobile/status.go#IntendedPanic() provided by status-go.

PR is waiting for #21706 to be resolved for this one to be taken out of draft.

Review notes

Documentation about Sentry in status-go: https://github.com/status-im/status-go/blob/3466ac2661bb19cd0eaa27761551de3b4d31b393/internal/sentry/README.md#L60

Areas that may be impacted

Whenever a panic happens in status-go and usage data collection is enabled we will send error data to Sentry. In theory, nothing should change for the user, therefore nothing should be visibly different in the app's behavior.

Steps to test

Before following the steps below, the CI must be configured with the appropriate SENTRY_DSN_STATUS_GO value. You can also use a free tier cloud instance to do your own testing in case you want to play around with Sentry.

  1. Login with any profile.
  2. Enable usage data collection (for now, Sentry and analytics are tied to the same setting in status-go).
  3. Go to Settings > Feature flags and enable app-monitoring > intentional-crash
  4. Go to Settings > Advanced > and press on Force crash immediately

Usually you should see the error in the Sentry dashboard in a matter of seconds.

status: ready

@ilmotta ilmotta self-assigned this Nov 26, 2024
@ilmotta ilmotta requested a review from jakubgs as a code owner November 26, 2024 10:12
@ilmotta ilmotta marked this pull request as draft November 26, 2024 10:12
@status-im-auto
Copy link
Member

status-im-auto commented Nov 26, 2024

Jenkins Builds

Click to see older builds (198)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ce51060 #1 2024-11-26 10:17:49 ~4 min tests 📄log
✔️ ce51060 #1 2024-11-26 10:21:12 ~8 min android-e2e 🤖apk 📲
✔️ ce51060 #1 2024-11-26 10:21:34 ~8 min android 🤖apk 📲
✔️ ce51060 #1 2024-11-26 10:22:22 ~9 min ios 📱ipa 📲
✔️ 3fc9ea1 #2 2024-12-02 11:38:01 ~4 min tests 📄log
✔️ 3fc9ea1 #2 2024-12-02 11:41:27 ~7 min android-e2e 🤖apk 📲
✔️ 3fc9ea1 #2 2024-12-02 11:41:59 ~8 min android 🤖apk 📲
3fc9ea1 #2 2024-12-02 11:43:48 ~10 min ios 📄log
✔️ dd61539 #4 2024-12-02 22:55:19 ~4 min tests 📄log
✔️ dd61539 #4 2024-12-02 22:57:49 ~7 min ios 📱ipa 📲
✔️ dd61539 #4 2024-12-02 22:58:44 ~7 min android-e2e 🤖apk 📲
✔️ dd61539 #4 2024-12-02 22:59:25 ~8 min android 🤖apk 📲
✔️ bb16070 #6 2024-12-06 12:54:50 ~4 min tests 📄log
✔️ bb16070 #6 2024-12-06 12:57:30 ~6 min ios 📱ipa 📲
✔️ bb16070 #6 2024-12-06 12:59:37 ~9 min android-e2e 🤖apk 📲
✔️ bb16070 #6 2024-12-06 13:01:11 ~10 min android 🤖apk 📲
✔️ e342290 #8 2024-12-09 11:31:32 ~4 min tests 📄log
✔️ e342290 #8 2024-12-09 11:34:25 ~7 min ios 📱ipa 📲
✔️ e342290 #8 2024-12-09 11:35:27 ~8 min android-e2e 🤖apk 📲
✔️ e342290 #8 2024-12-09 11:37:40 ~10 min android 🤖apk 📲
✔️ 98318b5 #9 2024-12-09 14:41:14 ~6 min tests 📄log
✔️ 98318b5 #9 2024-12-09 14:43:44 ~8 min android 🤖apk 📲
✔️ 98318b5 #9 2024-12-09 14:44:13 ~9 min android-e2e 🤖apk 📲
✔️ 98318b5 #9 2024-12-09 14:44:39 ~9 min ios 📱ipa 📲
✔️ a2f986a #10 2024-12-09 14:55:20 ~6 min tests 📄log
✔️ a2f986a #10 2024-12-09 14:57:36 ~9 min ios 📱ipa 📲
✔️ a2f986a #10 2024-12-09 14:59:10 ~10 min android-e2e 🤖apk 📲
✔️ a2f986a #10 2024-12-09 14:59:53 ~11 min android 🤖apk 📲
✔️ 52cbdf2 #11 2024-12-09 16:09:28 ~5 min tests 📄log
✔️ 52cbdf2 #11 2024-12-09 16:12:14 ~8 min android-e2e 🤖apk 📲
✔️ 52cbdf2 #11 2024-12-09 16:12:17 ~8 min ios 📱ipa 📲
✔️ 52cbdf2 #11 2024-12-09 16:12:32 ~8 min android 🤖apk 📲
✔️ 1d3e0be #12 2024-12-09 17:38:57 ~4 min tests 📄log
✔️ 1d3e0be #12 2024-12-09 17:41:03 ~6 min ios 📱ipa 📲
✔️ 1d3e0be #12 2024-12-09 17:42:07 ~7 min android-e2e 🤖apk 📲
✔️ 1d3e0be #12 2024-12-09 17:42:47 ~8 min android 🤖apk 📲
3060ceb #13 2024-12-10 09:41:38 ~3 min tests 📄log
✔️ 3060ceb #13 2024-12-10 09:45:19 ~7 min ios 📱ipa 📲
✔️ 3060ceb #13 2024-12-10 09:47:21 ~9 min android-e2e 🤖apk 📲
✔️ 3060ceb #13 2024-12-10 09:47:51 ~9 min android 🤖apk 📲
✔️ ffda450 #14 2024-12-10 10:01:58 ~4 min tests 📄log
✔️ ffda450 #14 2024-12-10 10:05:47 ~8 min android-e2e 🤖apk 📲
✔️ ffda450 #14 2024-12-10 10:06:19 ~8 min android 🤖apk 📲
✔️ ffda450 #14 2024-12-10 10:08:44 ~11 min ios 📱ipa 📲
✔️ 5e1ba63 #15 2024-12-10 11:00:39 ~5 min tests 📄log
✔️ 5e1ba63 #15 2024-12-10 11:04:38 ~9 min android-e2e 🤖apk 📲
✔️ 5e1ba63 #15 2024-12-10 11:05:15 ~9 min android 🤖apk 📲
✔️ 5e1ba63 #15 2024-12-10 11:17:11 ~21 min ios 📱ipa 📲
✔️ 81c9ee2 #16 2024-12-10 18:56:00 ~4 min tests 📄log
✔️ 81c9ee2 #16 2024-12-10 18:59:05 ~7 min android 🤖apk 📲
✔️ 81c9ee2 #16 2024-12-10 19:00:34 ~8 min ios 📱ipa 📲
✔️ 81c9ee2 #16 2024-12-10 19:01:31 ~9 min android-e2e 🤖apk 📲
✔️ bf616e1 #17 2024-12-10 20:23:52 ~5 min tests 📄log
✔️ bf616e1 #17 2024-12-10 20:25:58 ~7 min ios 📱ipa 📲
✔️ bf616e1 #17 2024-12-10 20:28:04 ~9 min android-e2e 🤖apk 📲
✔️ bf616e1 #17 2024-12-10 20:28:46 ~10 min android 🤖apk 📲
✔️ 5f4710b #18 2024-12-10 20:42:06 ~4 min tests 📄log
✔️ 5f4710b #18 2024-12-10 20:43:44 ~6 min android-e2e 🤖apk 📲
✔️ 5f4710b #18 2024-12-10 20:44:09 ~6 min ios 📱ipa 📲
✔️ 5f4710b #18 2024-12-10 20:45:52 ~8 min android 🤖apk 📲
✔️ 0f334a7 #19 2024-12-10 21:02:19 ~4 min tests 📄log
✔️ 0f334a7 #19 2024-12-10 21:06:04 ~7 min ios 📱ipa 📲
✔️ 0f334a7 #19 2024-12-10 21:07:29 ~9 min android-e2e 🤖apk 📲
✔️ 0f334a7 #19 2024-12-10 21:09:17 ~11 min android 🤖apk 📲
✔️ 0c0c236 #22 2024-12-12 04:08:39 ~4 min tests 📄log
✔️ 0c0c236 #22 2024-12-12 04:11:16 ~6 min ios 📱ipa 📲
✔️ 0c0c236 #22 2024-12-12 04:12:44 ~8 min android-e2e 🤖apk 📲
✔️ 0c0c236 #22 2024-12-12 04:13:12 ~8 min android 🤖apk 📲
✔️ 7bdbc7c #23 2024-12-12 05:02:04 ~4 min tests 📄log
✔️ 7bdbc7c #23 2024-12-12 05:04:49 ~7 min android-e2e 🤖apk 📲
✔️ 7bdbc7c #23 2024-12-12 05:04:54 ~7 min ios 📱ipa 📲
✔️ 7bdbc7c #23 2024-12-12 05:06:14 ~8 min android 🤖apk 📲
✔️ 7f8ffcf #24 2024-12-12 05:20:47 ~5 min tests 📄log
✔️ 7f8ffcf #24 2024-12-12 05:22:18 ~6 min android-e2e 🤖apk 📲
✔️ 7f8ffcf #24 2024-12-12 05:22:46 ~7 min ios 📱ipa 📲
✔️ 7f8ffcf #24 2024-12-12 05:26:14 ~10 min android 🤖apk 📲
✔️ 6039a40 #25 2024-12-12 05:36:21 ~4 min tests 📄log
✔️ 6039a40 #25 2024-12-12 05:38:44 ~7 min ios 📱ipa 📲
✔️ 6039a40 #25 2024-12-12 05:39:02 ~7 min android 🤖apk 📲
✔️ 6039a40 #25 2024-12-12 05:39:32 ~7 min android-e2e 🤖apk 📲
✔️ 706d9a8 #26 2025-01-06 11:44:18 ~4 min tests 📄log
✔️ 706d9a8 #26 2025-01-06 11:48:22 ~8 min android-e2e 🤖apk 📲
✔️ 706d9a8 #26 2025-01-06 11:48:50 ~9 min ios 📱ipa 📲
✔️ 706d9a8 #26 2025-01-06 11:49:44 ~10 min android 🤖apk 📲
✔️ 0e771c4 #27 2025-01-07 08:03:27 ~5 min tests 📄log
✔️ 0e771c4 #27 2025-01-07 08:06:23 ~8 min ios 📱ipa 📲
✔️ 0e771c4 #27 2025-01-07 08:08:11 ~10 min android-e2e 🤖apk 📲
✔️ 0e771c4 #27 2025-01-07 08:09:37 ~11 min android 🤖apk 📲
✔️ a4d4a3b #28 2025-01-07 08:15:17 ~5 min tests 📄log
✔️ a4d4a3b #28 2025-01-07 08:19:50 ~9 min ios 📱ipa 📲
✔️ a4d4a3b #28 2025-01-07 08:19:53 ~10 min android-e2e 🤖apk 📲
✔️ 77da7ff #30 2025-01-07 08:26:40 ~4 min tests 📄log
✔️ 77da7ff #30 2025-01-07 08:30:01 ~7 min android-e2e 🤖apk 📲
✔️ 77da7ff #30 2025-01-07 08:30:39 ~8 min ios 📱ipa 📲
✔️ 77da7ff #30 2025-01-07 08:31:56 ~9 min android 🤖apk 📲
✔️ 9cff936 #31 2025-01-07 08:44:29 ~5 min tests 📄log
✔️ 9cff936 #31 2025-01-07 08:46:27 ~7 min ios 📱ipa 📲
✔️ 9cff936 #31 2025-01-07 08:49:09 ~9 min android-e2e 🤖apk 📲
✔️ 9cff936 #31 2025-01-07 08:49:15 ~9 min android 🤖apk 📲
27934bb #32 2025-01-23 06:30:00 ~2 min tests 📄log
✔️ 27934bb #32 2025-01-23 06:35:11 ~7 min android-e2e 🤖apk 📲
✔️ 27934bb #32 2025-01-23 06:36:52 ~9 min android 🤖apk 📲
a86db56 #33 2025-01-23 06:48:41 ~3 min tests 📄log
✔️ a86db56 #33 2025-01-23 06:55:34 ~10 min android-e2e 🤖apk 📲
✔️ a86db56 #33 2025-01-23 06:57:25 ~12 min android 🤖apk 📲
1f6cbe2 #34 2025-01-23 07:07:51 ~3 min tests 📄log
✔️ 1f6cbe2 #34 2025-01-23 07:12:54 ~8 min android-e2e 🤖apk 📲
✔️ 1f6cbe2 #34 2025-01-23 07:14:21 ~10 min android 🤖apk 📲
15deff6 #35 2025-01-23 07:53:50 ~20 sec android-e2e 📄log
15deff6 #35 2025-01-23 07:53:58 ~19 sec android 📄log
e2cc7d6 #36 2025-01-23 07:54:56 ~26 sec android-e2e 📄log
e2cc7d6 #36 2025-01-23 07:54:56 ~22 sec android 📄log
99e3c9f #37 2025-01-23 08:00:07 ~3 min tests 📄log
✔️ 99e3c9f #37 2025-01-23 08:06:24 ~9 min android-e2e 🤖apk 📲
✔️ 99e3c9f #37 2025-01-23 08:07:58 ~11 min android 🤖apk 📲
5b402ba #38 2025-01-23 10:25:56 ~3 min tests 📄log
562ec95 #39 2025-01-23 10:33:50 ~4 min tests 📄log
d4b269d #41 2025-01-23 10:41:58 ~3 min tests 📄log
✔️ d4b269d #41 2025-01-23 10:47:45 ~9 min android-e2e 🤖apk 📲
✔️ d4b269d #41 2025-01-23 10:49:10 ~10 min android 🤖apk 📲
✔️ 04b0faa #42 2025-01-23 10:57:14 ~5 min tests 📄log
✔️ 04b0faa #42 2025-01-23 10:59:26 ~7 min android-e2e 🤖apk 📲
✔️ 15bf611 #43 2025-01-23 11:06:09 ~6 min tests 📄log
✔️ 15bf611 #43 2025-01-23 11:10:00 ~10 min android-e2e 🤖apk 📲
✔️ 15bf611 #43 2025-01-23 11:11:27 ~11 min ios 📱ipa 📲
✔️ 15bf611 #43 2025-01-23 11:11:43 ~11 min android 🤖apk 📲
✔️ 85b521f #44 2025-01-27 09:58:45 ~4 min tests 📄log
✔️ 85b521f #44 2025-01-27 10:01:38 ~7 min android-e2e 🤖apk 📲
✔️ 85b521f #44 2025-01-27 10:03:21 ~9 min android 🤖apk 📲
✔️ 85b521f #44 2025-01-27 10:06:46 ~12 min ios 📱ipa 📲
✔️ b64c5d7 #45 2025-01-27 12:53:20 ~4 min tests 📄log
✔️ a2cb0b1 #46 2025-01-27 13:01:57 ~5 min tests 📄log
✔️ a2cb0b1 #46 2025-01-27 13:06:23 ~9 min android-e2e 🤖apk 📲
✔️ a2cb0b1 #46 2025-01-27 13:07:59 ~11 min android 🤖apk 📲
✔️ a2cb0b1 #46 2025-01-27 13:08:09 ~11 min ios 📱ipa 📲
✔️ 850a03f #47 2025-01-29 00:09:22 ~4 min tests 📄log
✔️ 850a03f #47 2025-01-29 00:13:37 ~8 min android 🤖apk 📲
✔️ 850a03f #47 2025-01-29 00:13:37 ~8 min android-e2e 🤖apk 📲
✔️ 217f85d #48 2025-01-29 00:20:41 ~5 min tests 📄log
✔️ 217f85d #48 2025-01-29 00:23:40 ~8 min android-e2e 🤖apk 📲
✔️ 217f85d #48 2025-01-29 00:23:55 ~9 min android 🤖apk 📲
✔️ 217f85d #48 2025-01-29 00:27:27 ~12 min ios 📱ipa 📲
✔️ ab74e58 #49 2025-02-02 21:46:49 ~5 min tests 📄log
✔️ ab74e58 #49 2025-02-02 21:51:05 ~9 min android-e2e 🤖apk 📲
✔️ ab74e58 #49 2025-02-02 21:51:38 ~9 min android 🤖apk 📲
✔️ ab74e58 #49 2025-02-02 21:53:20 ~11 min ios 📱ipa 📲
✔️ c639f62 #50 2025-02-02 22:27:55 ~4 min tests 📄log
✔️ c639f62 #50 2025-02-02 22:32:50 ~9 min android-e2e 🤖apk 📲
✔️ c639f62 #50 2025-02-02 22:33:18 ~10 min android 🤖apk 📲
✔️ c639f62 #50 2025-02-02 22:33:36 ~10 min ios 📱ipa 📲
✔️ f5ca9f9 #51 2025-02-11 09:28:46 ~9 min android-e2e 🤖apk 📲
✔️ f5ca9f9 #51 2025-02-11 09:28:57 ~9 min tests 📄log
✔️ f5ca9f9 #51 2025-02-11 09:30:58 ~11 min android 🤖apk 📲
✔️ f5ca9f9 #51 2025-02-11 09:36:54 ~17 min ios 📱ipa 📲
✔️ ef4cd42 #52 2025-02-18 06:28:08 ~5 min tests 📄log
✔️ ef4cd42 #52 2025-02-18 06:30:38 ~8 min android 🤖apk 📲
✔️ ef4cd42 #52 2025-02-18 06:30:59 ~8 min android-e2e 🤖apk 📲
✔️ ef4cd42 #52 2025-02-18 06:35:16 ~12 min ios 📱ipa 📲
83e5b68 #53 2025-02-18 07:29:29 ~12 sec android-e2e 📄log
83e5b68 #53 2025-02-18 07:29:33 ~12 sec android 📄log
83e5b68 #53 2025-02-18 07:29:33 ~12 sec ios 📄log
✔️ 83e5b68 #53 2025-02-18 07:33:42 ~4 min tests 📄log
✔️ fe8bbaf #54 2025-02-18 07:48:38 ~5 min tests 📄log
✔️ fe8bbaf #55 2025-02-18 07:51:20 ~7 min android 🤖apk 📲
✔️ fe8bbaf #55 2025-02-18 07:51:32 ~8 min android-e2e 🤖apk 📲
✔️ fe8bbaf #55 2025-02-18 07:54:38 ~11 min ios 📱ipa 📲
71042ee #56 2025-02-18 10:09:06 ~12 sec ios 📄log
71042ee #56 2025-02-18 10:09:14 ~22 sec android-e2e 📄log
71042ee #56 2025-02-18 10:09:15 ~24 sec android 📄log
✔️ 71042ee #55 2025-02-18 10:15:05 ~6 min tests 📄log
✔️ c717d0d #56 2025-02-18 10:34:57 ~6 min tests 📄log
✔️ c717d0d #57 2025-02-18 10:36:32 ~8 min android-e2e 🤖apk 📲
✔️ c717d0d #57 2025-02-18 10:38:37 ~10 min android 🤖apk 📲
✔️ c717d0d #57 2025-02-18 10:41:39 ~13 min ios 📱ipa 📲
✔️ 7362310 #57 2025-02-19 02:19:47 ~6 min tests 📄log
✔️ 7362310 #58 2025-02-19 02:23:17 ~10 min android-e2e 🤖apk 📲
✔️ 7362310 #58 2025-02-19 02:23:55 ~10 min android 🤖apk 📲
✔️ 7362310 #58 2025-02-19 02:24:53 ~11 min ios 📱ipa 📲
✔️ a081ac4 #58 2025-02-20 17:45:51 ~5 min tests 📄log
✔️ a081ac4 #59 2025-02-20 17:48:15 ~7 min android-e2e 🤖apk 📲
✔️ a081ac4 #59 2025-02-20 17:49:30 ~8 min android 🤖apk 📲
✔️ a081ac4 #59 2025-02-20 17:52:13 ~11 min ios 📱ipa 📲
✔️ e0581a8 #59 2025-02-20 19:13:25 ~5 min tests 📄log
✔️ e0581a8 #60 2025-02-20 19:17:20 ~9 min android-e2e 🤖apk 📲
✔️ e0581a8 #60 2025-02-20 19:17:49 ~9 min android 🤖apk 📲
✔️ e0581a8 #60 2025-02-20 19:19:03 ~10 min ios 📱ipa 📲
✔️ 74aa578 #60 2025-02-20 20:10:42 ~5 min tests 📄log
✔️ 74aa578 #61 2025-02-20 20:14:31 ~8 min android-e2e 🤖apk 📲
✔️ 74aa578 #61 2025-02-20 20:15:11 ~9 min android 🤖apk 📲
✔️ 74aa578 #61 2025-02-20 20:18:19 ~12 min ios 📱ipa 📲
✔️ a1e2e2c #61 2025-02-22 12:19:23 ~5 min tests 📄log
✔️ a1e2e2c #62 2025-02-22 12:24:09 ~10 min android-e2e 🤖apk 📲
✔️ a1e2e2c #62 2025-02-22 12:24:54 ~11 min android 🤖apk 📲
✔️ a1e2e2c #62 2025-02-22 12:26:33 ~12 min ios 📱ipa 📲
✔️ cd5222d #62 2025-02-22 12:34:39 ~4 min tests 📄log
✔️ cd5222d #63 2025-02-22 12:38:42 ~8 min android-e2e 🤖apk 📲
✔️ cd5222d #63 2025-02-22 12:39:28 ~9 min android 🤖apk 📲
✔️ cd5222d #63 2025-02-22 12:40:28 ~10 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 40f145a #63 2025-02-22 12:59:57 ~4 min tests 📄log
✔️ 40f145a #64 2025-02-22 13:03:00 ~7 min android-e2e 🤖apk 📲
✔️ 40f145a #64 2025-02-22 13:03:29 ~8 min android 🤖apk 📲
✔️ 40f145a #64 2025-02-22 13:05:51 ~10 min ios 📱ipa 📲
✔️ 586c8cb #64 2025-02-22 13:44:20 ~4 min tests 📄log
✔️ 586c8cb #65 2025-02-22 13:46:58 ~7 min android-e2e 🤖apk 📲
✔️ 586c8cb #65 2025-02-22 13:47:49 ~8 min android 🤖apk 📲
✔️ 586c8cb #65 2025-02-22 13:50:11 ~10 min ios 📱ipa 📲

@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch from ce51060 to 3fc9ea1 Compare December 2, 2024 11:33
@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch 2 times, most recently from 4d06118 to dd61539 Compare December 2, 2024 22:50
@ilmotta ilmotta marked this pull request as ready for review December 2, 2024 22:50
@ilmotta ilmotta changed the title [DRAFT] Configure Sentry for Mobile [DO NOT MERGE] Configure Sentry for Mobile Dec 2, 2024
@ilmotta ilmotta marked this pull request as draft December 3, 2024 00:58
@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch from dd61539 to 86d99cd Compare December 6, 2024 12:47
@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 6, 2024

@siddarthkay @markoburcul this PR should be ready now to be used for testing the full integration with Sentry. In theory, the only thing needed is to set the value of SENTRY_DSN_STATUS_GO in Jenkins and things should work.

  1. I cherry-picked the infra code from ci: enable sentry for releases #21766
  2. I temporarily enabled the Advanced Settings option to allow devs and QAs to force crash the app to see errors in Sentry.
  3. I think we don't need to add vars SENTRY_CONTEXT_NAME or SENTRY_CONTEXT_VERSION to shadow-cljs.edn because we only need to do that when we need to pass env vars via the Clojure runtime, but since these vars are used directly by status-go build process they shouldn't be needed. I can be wrong here :)

Edit: after this PR is tested successfully I will remove the cherry-picked commit and disable the option to force crash from any build.

@siddarthkay
Copy link
Contributor

@ilmotta : regarding point 3, ah yeah we don't need that in @markoburcul 's commit we pass those vars to status-go which is where it matters.

@markoburcul
Copy link

@ilmotta did you test this with the changes from my PR?

@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 9, 2024

@ilmotta did you test this with the changes from my PR?

Sure I did, I cherry picked the single commit from https://github.com/status-im/status-mobile/pull/21766/commits. Local dev builds work, I just tested again https://sentry.infra.status.im/organizations/sentry/issues/142/?project=7&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=0

One problem for sure is that running make release-android is not passing through the value of SENTRY_DSN_STATUS_GO to the Clojure compiler.

I pushed a commit just now updating scripts/build-android.sh to add SENTRY_DSN_STATUS_GO to SECRETS_ENV_VARS.

@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 9, 2024

From the screenshot below, we see Sentry DSN is not set in the latest PR build.

@markoburcul
Copy link

From the screenshot below, we see Sentry DSN is not set in the latest PR build.

Sentry DSN will be set only on release builds. Can you run manual pipeline with BUILD_TYPE=release from your branch?

@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 9, 2024

Sentry DSN will be set only on release builds. Can you run manual pipeline with BUILD_TYPE=release from your branch?

Makes sense for now 👍🏼 Hopefully not too far in the future away we can set-up a Sentry project to work with non-release builds, because that can be quite helpful as well.

@markoburcul the manual job is failing https://ci.infra.status.im/job/status-mobile/job/manual/. I ran it twice with the correct parameters https://ci.infra.status.im/job/status-mobile/job/manual/340/parameters/, but could you take a look please? The iOS step is failing, then we can't get the up-to-date artifact to test.

@markoburcul
Copy link

@markoburcul the manual job is failing https://ci.infra.status.im/job/status-mobile/job/manual/. I ran it twice with the correct parameters https://ci.infra.status.im/job/status-mobile/job/manual/340/parameters/, but could you take a look please? The iOS step is failing, then we can't get the up-to-date artifact to test.

As @siddarthkay said: update VERSION file to 2.32.PRNUMBER since you are getting the error:

[2024-12-09T13:00:19.749Z]  [Application Loader Error Output]: ERROR: [ContentDelivery.Uploader] Asset validation failed (90478) Invalid Version. The build with the version “2.31.0” can’t be imported because a later version has been closed for new build submissions. Choose a different version number. (ID: 18438730-87e6-4a68-af5b-f0e2423be47d)

@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch 2 times, most recently from 98318b5 to a2f986a Compare December 9, 2024 14:48
@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 9, 2024

@markoburcul the SENTRY_DSN_STATUS_GO var is still not being injected correctly.

The manual release build in Jenkins was successful this time https://ci.infra.status.im/job/status-mobile/job/manual/342/. Thanks for the help

After trying out the manual release APK generated from Jenkins, you can see in the screenshots below that the Sentry DSN isn't set and that the app is using the expected commit hash used by the Jenkins build.

@markoburcul
Copy link

After trying out the manual release APK generated from Jenkins, you can see in the screenshots below that the Sentry DSN isn't set and that the app is using the expected commit hash used by the Jenkins build.

I've updated my PR, I think it should work now..

@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch from a2f986a to 52cbdf2 Compare December 9, 2024 16:03
@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 9, 2024

After trying out the manual release APK generated from Jenkins, you can see in the screenshots below that the Sentry DSN isn't set and that the app is using the expected commit hash used by the Jenkins build.

I've updated my PR, I think it should work now..

@markoburcul no luck yet. I cherry picked commit b62ae9e, but the env var is still not available.

@igor-sirotin
Copy link
Contributor

Makes sense for now 👍🏼 Hopefully not too far in the future away we can set-up a Sentry project to work with non-release builds, because that can be quite helpful as well.

@ilmotta Actually it was the intention to keep it only for release builds for now.
But let's discuss it after the release, we can extend it on easily, all parameters are already in place 👌

@ilmotta ilmotta marked this pull request as ready for review February 11, 2025 09:16
@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch from c639f62 to f5ca9f9 Compare February 11, 2025 09:19
@siddarthkay siddarthkay force-pushed the ilmotta/add-sentry-support branch from f5ca9f9 to ef4cd42 Compare February 18, 2025 06:22
@siddarthkay
Copy link
Contributor

siddarthkay commented Feb 18, 2025

Screenshot 2025-02-18 at 12 39 43 PM

Jenkins does show that this credential has not been used anywhere.

@siddarthkay siddarthkay force-pushed the ilmotta/add-sentry-support branch from 83e5b68 to fe8bbaf Compare February 18, 2025 07:43
@siddarthkay
Copy link
Contributor

Screenshot 2025-02-18 at 1 15 14 PM

@ilmotta : should be fixed from CI side now.
Another manual build for release artefacts to verify :
https://ci.infra.status.im/blue/organizations/jenkins/status-mobile%2Fplatforms%2Fandroid/detail/android/2131/pipeline

@siddarthkay siddarthkay force-pushed the ilmotta/add-sentry-support branch 2 times, most recently from 71042ee to c717d0d Compare February 18, 2025 10:28
@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch 2 times, most recently from 7362310 to a081ac4 Compare February 20, 2025 17:40
@ilmotta ilmotta removed the blocked label Feb 20, 2025
@ilmotta ilmotta force-pushed the ilmotta/add-sentry-support branch from e0581a8 to 74aa578 Compare February 20, 2025 20:05
@ilmotta
Copy link
Contributor Author

ilmotta commented Feb 20, 2025

Hi @siddarthkay. Below are the results and we unfortunately still have the incorrect env var value set in PR builds.

Release build results ✅

I tested the following cases, all successful:

  • When the "App interactions" toggle is disabled in privacy settings, a crash doesn't send errors to Sentry.
  • When the "App interactions" toggle is enabled in privacy settings, a crash sends an error to Sentry.
  • The release version metadata has the same value in Sentry as in status-go-version.json.
  • Other metadata, like OS version, context name, and context version had the expected values, per screenshot below.

PR build results ⛔

I tested the same scenarios as the release build, but Jenkins or some script in Jenkins is injecting the incorrect env var value @siddarthkay. The env var SENTRY_DSN_STATUS_GO has the value null (per screenshot below). The impact is that, after a user of a PR build enables the "App interactions" toggle, the next time they initialize the application they won't see the profiles list, and will see the initial onboarding screen, as if no profiles were created. This is because any error in the call to InitializeApplication in status-go fallback to the initial onboarding screen.

@siddarthkay
Copy link
Contributor

@ilmotta : I assumed we don't need SENTRY_DSN_STATUS_GO in PR builds.. I had set it to some garbage in Jenkins Credential Manager. only release builds will get correct value for SENTRY_DSN_STATUS_GO

I saw in description of this issue: #21706

Screenshot 2025-02-21 at 11 50 37 AM

Incase PR builds also need to have SENTRY_DSN_STATUS_GO should that value be the same as the release one? If not can you let me know what should i set that to?

@markoburcul
Copy link

I tested the same scenarios as the release build, but Jenkins or some script in Jenkins is injecting the incorrect env var value @siddarthkay. The env var SENTRY_DSN_STATUS_GO has the value null (per screenshot below). The impact is that, after a user of a PR build enables the "App interactions" toggle, the next time they initialize the application they won't see the profiles list, and will see the initial onboarding screen, as if no profiles were created. This is because any error in the call to InitializeApplication in status-go fallback to the initial onboarding screen.

Why would you need to use Sentry in PR builds? If this is something temporary to test how integration works, we can create a separate Sentry project and I would put credentials from those in the SENTRY_DSN_STATUS_GO variable in Jenkins. But I don't think sending crash reports from PR builds is a way to go.

@ilmotta
Copy link
Contributor Author

ilmotta commented Feb 21, 2025

@siddarthkay @markoburcul we don't necessarily need PR builds integrated with Sentry, that would be fine for sure. But as I shared above, the env var has its value set to the string null, which is incorrect and makes testing PR builds unusable after the toggle App interactions is enabled in the Privacy & security settings.

Probably the best is to unset the var, or at least use an actual empty string would fix the issue.

@siddarthkay siddarthkay force-pushed the ilmotta/add-sentry-support branch from 74aa578 to a1e2e2c Compare February 22, 2025 12:13
@siddarthkay siddarthkay force-pushed the ilmotta/add-sentry-support branch from 40f145a to 586c8cb Compare February 22, 2025 13:39
@siddarthkay
Copy link
Contributor

the env var has its value set to the string null

This was because when you rebased you may have undone my changes to status-jenkins-lib version in all of the Jenkinsfiles.

https://github.com/status-im/status-mobile/compare/71042eea0152c3b99215921d2b9ca1230e3a376f..c717d0d94052c32568fb25a16a7d3d10a605606f

I have checked PR build now on iOS and this is what i see.

IMG_095BFE25F16E-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: CONTRIBUTOR
Status: No status
Development

Successfully merging this pull request may close these issues.

Configure status-go to use Sentry
7 participants