From 69cd49445071f2d477b602d122e99661085d4cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 4 Sep 2024 13:26:50 +0200 Subject: [PATCH 1/7] chore: add sentry for error tracking --- .gitignore | 2 + app.json | 12 ++- app/_layout.tsx | 5 + metro.config.js | 4 +- package.json | 5 +- yarn.lock | 249 +++++++++++++++++++++++++++++++++++++++++------- 6 files changed, 238 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 05647d5..45e61cc 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ yarn-error.* # typescript *.tsbuildinfo + +.env.local diff --git a/app.json b/app.json index 7dbe894..91dfd62 100644 --- a/app.json +++ b/app.json @@ -39,7 +39,15 @@ } ], "expo-router", - "expo-secure-store" + "expo-secure-store", + [ + "@sentry/react-native/expo", + { + "url": "https://sentry.io/", + "project": "alby-go", + "organization": "getalby" + } + ] ], "ios": { "supportsTablet": true, @@ -65,4 +73,4 @@ }, "owner": "roland_alby" } -} \ No newline at end of file +} diff --git a/app/_layout.tsx b/app/_layout.tsx index 4a6de40..9ab426d 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -22,6 +22,11 @@ import * as Font from "expo-font"; import { useInfo } from "~/hooks/useInfo"; import { secureStorage } from "~/lib/secureStorage"; import { hasOnboardedKey } from "~/lib/state/appStore"; +import * as Sentry from "@sentry/react-native"; + +Sentry.init({ + // Uses SENTRY_DSN from ENV +}); const LIGHT_THEME: Theme = { dark: false, diff --git a/metro.config.js b/metro.config.js index b0963fe..80b2bc3 100644 --- a/metro.config.js +++ b/metro.config.js @@ -1,6 +1,6 @@ -const { getDefaultConfig } = require("expo/metro-config"); const { withNativeWind } = require("nativewind/metro"); +const { getSentryExpoConfig } = require("@sentry/react-native/metro"); -const config = getDefaultConfig(__dirname); +const config = getSentryExpoConfig(__dirname); module.exports = withNativeWind(config, { input: "./global.css" }); diff --git a/package.json b/package.json index b780e91..4f795fa 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@getalby/lightning-tools": "^5.0.3", "@getalby/sdk": "^3.7.0", "@react-native-async-storage/async-storage": "1.23.1", + "@sentry/react-native": "~5.22.0", "bech32": "^2.0.0", "buffer": "^6.0.3", "class-variance-authority": "^0.7.0", @@ -28,7 +29,7 @@ "expo-camera": "~15.0.15", "expo-clipboard": "~6.0.3", "expo-constants": "~16.0.2", - "expo-font": "^12.0.9", + "expo-font": "~12.0.10", "expo-linear-gradient": "~13.0.2", "expo-linking": "~6.3.1", "expo-router": "^3.5.23", @@ -63,4 +64,4 @@ "typescript": "~5.3.3" }, "private": true -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 631d071..0625dae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2017,6 +2017,176 @@ component-type "^1.2.1" join-component "^1.1.0" +"@sentry-internal/feedback@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.113.0.tgz#90a3c5493e289d589cfde79330fca549a24f41a4" + integrity sha512-eEmL8QXauUnM3FXGv0GT29RpL0Jo0pkn/uMu3aqjhQo7JKNqUGVYIUxJxiGWbVMbDXqPQ7L66bjjMS3FR1GM2g== + dependencies: + "@sentry/core" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry-internal/replay-canvas@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.113.0.tgz#8a0165494b0a0ba7b1ae45166ca90a8749c38b7a" + integrity sha512-K8uA42aobNF/BAXf14el15iSAi9fonLBUrjZi6nPDq7zaA8rPvfcTL797hwCbqkETz2zDf52Jz7I3WFCshDoUw== + dependencies: + "@sentry/core" "7.113.0" + "@sentry/replay" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry-internal/tracing@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.113.0.tgz#936f23205ab53be62f1753b923eddc243cefde86" + integrity sha512-8MDnYENRMnEfQjvN4gkFYFaaBSiMFSU/6SQZfY9pLI3V105z6JQ4D0PGMAUVowXilwNZVpKNYohE7XByuhEC7Q== + dependencies: + "@sentry/core" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry/browser@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.113.0.tgz#09b77812cbf476eacdccdc714ba4e4ba2c170a88" + integrity sha512-PdyVHPOprwoxGfKGsP2dXDWO0MBDW1eyP7EZlfZvM1A4hjk6ZRNfCv30g+TrqX4hiZDKzyqN3+AdP7N/J2IX0Q== + dependencies: + "@sentry-internal/feedback" "7.113.0" + "@sentry-internal/replay-canvas" "7.113.0" + "@sentry-internal/tracing" "7.113.0" + "@sentry/core" "7.113.0" + "@sentry/integrations" "7.113.0" + "@sentry/replay" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry/cli-darwin@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.30.4.tgz#1726461997cd78f01c5f005528683092419b1b57" + integrity sha512-d61JxgtPvUtUZ58T4WgzFDsRODAQbKcRxhK9DY7Y/+q7fH1gWc6J8s8RwxxhYu/N/UuWnAcXNtIH9daUanKTjQ== + +"@sentry/cli-linux-arm64@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.30.4.tgz#edbcfde267abad123fe92ebd37151ab3e15dc575" + integrity sha512-XxRBiZAj84umr+i4n6zNGkbdJIX76G6SFalv4466XZkbhPuAeSABFQ5PxRVc+j7pLyOBGao4q2yiO8wrBLsJug== + +"@sentry/cli-linux-arm@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.30.4.tgz#86961eaa16c731dd1ade5dfc728a001b1a6cefb8" + integrity sha512-2+L8FVOc8XLD2k4rUklsIG8gCoawOZJv1TdlHcIvsHIt6e55vVil6JDBc7dOD/tzJlJPAs+LMOuHHe8e/F+Y5A== + +"@sentry/cli-linux-i686@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.30.4.tgz#b35c7bec0d6d7680bd0d53fa42676dc40031bc5a" + integrity sha512-ruouCpmxJXumNxvZ4asQzz2gzAKeUhg9dofB9h5PEmemceTLKfOAyfplD5l1iLWL3+JfF88SNeuu2/sWHP7aBg== + +"@sentry/cli-linux-x64@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.30.4.tgz#77e77abf2b2356eb18ce386db07dbb6d786a566e" + integrity sha512-Kcb1Fn5wNSQW5bKkF35MpJSATtvgzGAHDzJkuEXPfF9xQMhOaYPnMN/D0aLYZgTpQawL4CM7dcfLuaafGmiazQ== + +"@sentry/cli-win32-i686@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.30.4.tgz#714ec71dbe1e5ef98af3f5f37bd1adcc5dc9dbd7" + integrity sha512-FJ6IS+N7CsacDiHrFbE4Ic9UmumsiaBSD4SiQMIG2wfM7Ig1hc7+F4xoMC3MjivAIM7F94ZdSt0aZDGwE+zYeg== + +"@sentry/cli-win32-x64@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.30.4.tgz#00bc0f765bfa0abdf327a9d56e2bb0f2277a9981" + integrity sha512-wzvMpj+AVEaLKKLkN1vZxuEwQJa5s8qiasYMBJTXFtD7+LqrONerHCRqk79W+60IBXX7MQSRFF3IsjVJzJGEjA== + +"@sentry/cli@2.30.4": + version "2.30.4" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.30.4.tgz#29b3217165c923a2b64c99d8c1643fcc6d3205df" + integrity sha512-5zYdNGK2sNiP0zbnzMWuwm71KlCWLISbiJDyFQk6YYTKLh2RIYBPLF5mNLBxE2Ns4/wuKuBZjqE2ESLS5FzoOw== + dependencies: + https-proxy-agent "^5.0.0" + node-fetch "^2.6.7" + progress "^2.0.3" + proxy-from-env "^1.1.0" + which "^2.0.2" + optionalDependencies: + "@sentry/cli-darwin" "2.30.4" + "@sentry/cli-linux-arm" "2.30.4" + "@sentry/cli-linux-arm64" "2.30.4" + "@sentry/cli-linux-i686" "2.30.4" + "@sentry/cli-linux-x64" "2.30.4" + "@sentry/cli-win32-i686" "2.30.4" + "@sentry/cli-win32-x64" "2.30.4" + +"@sentry/core@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.113.0.tgz#84307eabf03ece9304894ad24ee15581a220c5c7" + integrity sha512-pg75y3C5PG2+ur27A0Re37YTCEnX0liiEU7EOxWDGutH17x3ySwlYqLQmZsFZTSnvzv7t3MGsNZ8nT5O0746YA== + dependencies: + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry/hub@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.113.0.tgz#12f14071f43e657cd36174ba8b06cc955da5492f" + integrity sha512-aoerhlAw3vnY9a27eKAoK862oMXFbyMFWbaZuCeR5gfg7sHsOkVQkCl3yiYfF5hfw9MbwbbY6GqWbCrA89Ci/A== + dependencies: + "@sentry/core" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry/integrations@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.113.0.tgz#cce71e07cf90c4bf9b22f85c3ce22d9ba926ae5a" + integrity sha512-w0sspGBQ+6+V/9bgCkpuM3CGwTYoQEVeTW6iNebFKbtN7MrM3XsGAM9I2cW1jVxFZROqCBPFtd2cs5n0j14aAg== + dependencies: + "@sentry/core" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + localforage "^1.8.1" + +"@sentry/react-native@~5.22.0": + version "5.22.3" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-5.22.3.tgz#89f451361bfaf37966ddba5aa42839eeee5e6344" + integrity sha512-CjMHCpsrMGwplna+ILSr+SN97LY5Ggw/JDTrsnhijpiKVMO8bDpeOdwfprAhX8DzaNHPkqKBXRTdbsr620WzZQ== + dependencies: + "@sentry/browser" "7.113.0" + "@sentry/cli" "2.30.4" + "@sentry/core" "7.113.0" + "@sentry/hub" "7.113.0" + "@sentry/integrations" "7.113.0" + "@sentry/react" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry/react@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.113.0.tgz#8e21c92e9691ea881639596d7e60a996b23ba229" + integrity sha512-+zVPz+h5Wydq4ntekw3/dXq5jeHIpZoQ2iqhB96PA9Y94JIq178i/xIP204S1h6rN7cmWAqtR93vnPKdxnlUbQ== + dependencies: + "@sentry/browser" "7.113.0" + "@sentry/core" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + hoist-non-react-statics "^3.3.2" + +"@sentry/replay@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.113.0.tgz#db41b792e5d9966a9b1ca4eb1695ad7100f39b50" + integrity sha512-UD2IaphOWKFdeGR+ZiaNAQ+wFsnwbJK6PNwcW6cHmWKv9COlKufpFt06lviaqFZ8jmNrM4H+r+R8YVTrqCuxgg== + dependencies: + "@sentry-internal/tracing" "7.113.0" + "@sentry/core" "7.113.0" + "@sentry/types" "7.113.0" + "@sentry/utils" "7.113.0" + +"@sentry/types@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.113.0.tgz#2193c9933838302c82814771b03a8647fa684ffb" + integrity sha512-PJbTbvkcPu/LuRwwXB1He8m+GjDDLKBtu3lWg5xOZaF5IRdXQU2xwtdXXsjge4PZR00tF7MO7X8ZynTgWbYaew== + +"@sentry/utils@7.113.0": + version "7.113.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.113.0.tgz#1e6e790c9d84e4809b2bb529bbd33a506b6db7bd" + integrity sha512-nzKsErwmze1mmEsbW2AwL2oB+I5v6cDEJY4sdfLekA4qZbYZ8pV5iWza6IRl4XfzGTE1qpkZmEjPU9eyo0yvYw== + dependencies: + "@sentry/types" "7.113.0" + "@sideway/address@^4.1.5": version "4.1.5" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" @@ -3636,7 +3806,14 @@ expo-file-system@~17.0.1: resolved "https://registry.yarnpkg.com/expo-file-system/-/expo-file-system-17.0.1.tgz#b9f8af8c1c06ec71d96fd7a0d2567fa9e1c88f15" integrity sha512-dYpnZJqTGj6HCYJyXAgpFkQWsiCH3HY1ek2cFZVHFoEc5tLz9gmdEgTF6nFHurvmvfmXqxi7a5CXyVm0aFYJBw== -expo-font@^12.0.9, expo-font@~12.0.9: +expo-font@~12.0.10: + version "12.0.10" + resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-12.0.10.tgz#62deaf1f46159d7839f01305f44079268781b1db" + integrity sha512-Q1i2NuYri3jy32zdnBaHHCya1wH1yMAsI+3CCmj9zlQzlhsS9Bdwcj2W3c5eU5FvH2hsNQy4O+O1NnM6o/pDaQ== + dependencies: + fontfaceobserver "^2.1.0" + +expo-font@~12.0.9: version "12.0.9" resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-12.0.9.tgz#096860a6b8b5dd54152262eafd318593ec2db48c" integrity sha512-seTCyf0tbgkAnp3ZI9ZfK9QVtURQUgFnuj+GuJ5TSnN0XsOtVe1s2RxTvmMgkfuvfkzcjJ69gyRpsZS1cC8hjw== @@ -4245,6 +4422,13 @@ hermes-profile-transformer@^0.0.6: dependencies: source-map "^0.7.3" +hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hosted-git-info@^3.0.2: version "3.0.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" @@ -4263,7 +4447,7 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -https-proxy-agent@^5.0.1: +https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -4293,6 +4477,11 @@ image-size@^1.0.2: dependencies: queue "6.0.2" +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -4885,6 +5074,13 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + lighthouse-logger@^1.0.0: version "1.4.2" resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz#aef90f9e97cd81db367c7634292ee22079280aaa" @@ -5026,6 +5222,13 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +localforage@^1.8.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -6141,7 +6344,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -progress@2.0.3: +progress@2.0.3, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -6177,6 +6380,11 @@ prop-types@^15.8.0: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -6278,7 +6486,7 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-is@^16.13.0, react-is@^16.13.1, react-is@^16.8.4: +react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.4: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -7039,16 +7247,7 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7108,7 +7307,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -7122,13 +7321,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -7830,7 +8022,7 @@ which@^1.2.9: dependencies: isexe "^2.0.0" -which@^2.0.1: +which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -7847,7 +8039,7 @@ wonka@^6.3.2: resolved "https://registry.yarnpkg.com/wonka/-/wonka-6.3.4.tgz#76eb9316e3d67d7febf4945202b5bdb2db534594" integrity sha512-CjpbqNtBGNAeyNS/9W6q3kSkKE52+FjIj7AkFlLr11s/VWGUu6a2CdYSdGxocIhIVjaW/zchesBQUKPVU69Cqg== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -7865,15 +8057,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From da2516d5b088883db78aebb8e19d9fc3c553bc9e Mon Sep 17 00:00:00 2001 From: im-adithya Date: Tue, 29 Oct 2024 18:35:13 +0530 Subject: [PATCH 2/7] chore: wrap root layout in sentry --- app/_layout.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index 08a21bc..e509143 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -21,7 +21,12 @@ import { useAppStore } from "~/lib/state/appStore"; import { useColorScheme } from "~/lib/useColorScheme"; Sentry.init({ - // Uses SENTRY_DSN from ENV + dsn: "https://ingest.us.sentry.io/key", + + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for tracing. + // We recommend adjusting this value in production + tracesSampleRate: 1.0, }); const LIGHT_THEME: Theme = { @@ -45,7 +50,7 @@ export const unstable_settings = { initialRouteName: "(app)/index", }; -export default function RootLayout() { +function RootLayout() { const { isDarkColorScheme } = useColorScheme(); const [fontsLoaded, setFontsLoaded] = React.useState(false); @@ -120,3 +125,5 @@ function useConnectionChecker() { } }, [error?.message]); } + +export default Sentry.wrap(RootLayout); From 56062f419f0b98e9c27986c1497a12cfe9fbaf57 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Tue, 29 Oct 2024 18:43:29 +0530 Subject: [PATCH 3/7] chore: use expected sentry react native package --- package.json | 4 +- yarn.lock | 308 +++++++++++++++++++++++++-------------------------- 2 files changed, 156 insertions(+), 156 deletions(-) diff --git a/package.json b/package.json index 7d34f3b..f400a07 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,10 @@ "@getalby/lightning-tools": "^5.0.3", "@getalby/sdk": "^3.7.1", "@react-native-async-storage/async-storage": "1.23.1", - "@sentry/react-native": "~5.22.0", "@rn-primitives/dialog": "^1.0.3", "@rn-primitives/portal": "^1.0.3", "@rn-primitives/switch": "^1.0.3", + "@sentry/react-native": "~5.24.3", "bech32": "^2.0.0", "buffer": "^6.0.3", "class-variance-authority": "^0.7.0", @@ -83,9 +83,9 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "husky": "^9.1.6", - "lint-staged": "^15.2.10", "jest": "^29.7.0", "jest-expo": "^51.0.4", + "lint-staged": "^15.2.10", "prettier": "^3.3.3", "tailwindcss": "^3.4.3", "typescript": "~5.3.3" diff --git a/yarn.lock b/yarn.lock index 533b7c4..6389796 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2781,87 +2781,87 @@ component-type "^1.2.1" join-component "^1.1.0" -"@sentry-internal/feedback@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.113.0.tgz#90a3c5493e289d589cfde79330fca549a24f41a4" - integrity sha512-eEmL8QXauUnM3FXGv0GT29RpL0Jo0pkn/uMu3aqjhQo7JKNqUGVYIUxJxiGWbVMbDXqPQ7L66bjjMS3FR1GM2g== - dependencies: - "@sentry/core" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry-internal/replay-canvas@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.113.0.tgz#8a0165494b0a0ba7b1ae45166ca90a8749c38b7a" - integrity sha512-K8uA42aobNF/BAXf14el15iSAi9fonLBUrjZi6nPDq7zaA8rPvfcTL797hwCbqkETz2zDf52Jz7I3WFCshDoUw== - dependencies: - "@sentry/core" "7.113.0" - "@sentry/replay" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry-internal/tracing@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.113.0.tgz#936f23205ab53be62f1753b923eddc243cefde86" - integrity sha512-8MDnYENRMnEfQjvN4gkFYFaaBSiMFSU/6SQZfY9pLI3V105z6JQ4D0PGMAUVowXilwNZVpKNYohE7XByuhEC7Q== - dependencies: - "@sentry/core" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry/browser@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.113.0.tgz#09b77812cbf476eacdccdc714ba4e4ba2c170a88" - integrity sha512-PdyVHPOprwoxGfKGsP2dXDWO0MBDW1eyP7EZlfZvM1A4hjk6ZRNfCv30g+TrqX4hiZDKzyqN3+AdP7N/J2IX0Q== - dependencies: - "@sentry-internal/feedback" "7.113.0" - "@sentry-internal/replay-canvas" "7.113.0" - "@sentry-internal/tracing" "7.113.0" - "@sentry/core" "7.113.0" - "@sentry/integrations" "7.113.0" - "@sentry/replay" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry/cli-darwin@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.30.4.tgz#1726461997cd78f01c5f005528683092419b1b57" - integrity sha512-d61JxgtPvUtUZ58T4WgzFDsRODAQbKcRxhK9DY7Y/+q7fH1gWc6J8s8RwxxhYu/N/UuWnAcXNtIH9daUanKTjQ== - -"@sentry/cli-linux-arm64@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.30.4.tgz#edbcfde267abad123fe92ebd37151ab3e15dc575" - integrity sha512-XxRBiZAj84umr+i4n6zNGkbdJIX76G6SFalv4466XZkbhPuAeSABFQ5PxRVc+j7pLyOBGao4q2yiO8wrBLsJug== - -"@sentry/cli-linux-arm@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.30.4.tgz#86961eaa16c731dd1ade5dfc728a001b1a6cefb8" - integrity sha512-2+L8FVOc8XLD2k4rUklsIG8gCoawOZJv1TdlHcIvsHIt6e55vVil6JDBc7dOD/tzJlJPAs+LMOuHHe8e/F+Y5A== - -"@sentry/cli-linux-i686@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.30.4.tgz#b35c7bec0d6d7680bd0d53fa42676dc40031bc5a" - integrity sha512-ruouCpmxJXumNxvZ4asQzz2gzAKeUhg9dofB9h5PEmemceTLKfOAyfplD5l1iLWL3+JfF88SNeuu2/sWHP7aBg== - -"@sentry/cli-linux-x64@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.30.4.tgz#77e77abf2b2356eb18ce386db07dbb6d786a566e" - integrity sha512-Kcb1Fn5wNSQW5bKkF35MpJSATtvgzGAHDzJkuEXPfF9xQMhOaYPnMN/D0aLYZgTpQawL4CM7dcfLuaafGmiazQ== - -"@sentry/cli-win32-i686@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.30.4.tgz#714ec71dbe1e5ef98af3f5f37bd1adcc5dc9dbd7" - integrity sha512-FJ6IS+N7CsacDiHrFbE4Ic9UmumsiaBSD4SiQMIG2wfM7Ig1hc7+F4xoMC3MjivAIM7F94ZdSt0aZDGwE+zYeg== - -"@sentry/cli-win32-x64@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.30.4.tgz#00bc0f765bfa0abdf327a9d56e2bb0f2277a9981" - integrity sha512-wzvMpj+AVEaLKKLkN1vZxuEwQJa5s8qiasYMBJTXFtD7+LqrONerHCRqk79W+60IBXX7MQSRFF3IsjVJzJGEjA== - -"@sentry/cli@2.30.4": - version "2.30.4" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.30.4.tgz#29b3217165c923a2b64c99d8c1643fcc6d3205df" - integrity sha512-5zYdNGK2sNiP0zbnzMWuwm71KlCWLISbiJDyFQk6YYTKLh2RIYBPLF5mNLBxE2Ns4/wuKuBZjqE2ESLS5FzoOw== +"@sentry-internal/feedback@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.117.0.tgz#4ca62cc469611720e76877a756cf24b792cb178e" + integrity sha512-4X+NnnY17W74TymgLFH7/KPTVYpEtoMMJh8HzVdCmHTOE6j32XKBeBMRaXBhmNYmEgovgyRKKf2KvtSfgw+V1Q== + dependencies: + "@sentry/core" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry-internal/replay-canvas@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.117.0.tgz#d6b3b711453c88e040f31ebab1d4bc627b4a6505" + integrity sha512-7hjIhwEcoosr+BIa0AyEssB5xwvvlzUpvD5fXu4scd3I3qfX8gdnofO96a8r+LrQm3bSj+eN+4TfKEtWb7bU5A== + dependencies: + "@sentry/core" "7.117.0" + "@sentry/replay" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry-internal/tracing@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.117.0.tgz#c7d2357dae8d7ea2bc130e4513ac4ffc8dc7553c" + integrity sha512-fAIyijNvKBZNA12IcKo+dOYDRTNrzNsdzbm3DP37vJRKVQu19ucqP4Y6InvKokffDP2HZPzFPDoGXYuXkDhUZg== + dependencies: + "@sentry/core" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry/browser@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.117.0.tgz#3030073f360974dadcf5a5f2e1542497b3be2482" + integrity sha512-29X9HlvDEKIaWp6XKlNPPSNND0U6P/ede5WA2nVHfs1zJLWdZ7/ijuMc0sH/CueEkqHe/7gt94hBcI7HOU/wSw== + dependencies: + "@sentry-internal/feedback" "7.117.0" + "@sentry-internal/replay-canvas" "7.117.0" + "@sentry-internal/tracing" "7.117.0" + "@sentry/core" "7.117.0" + "@sentry/integrations" "7.117.0" + "@sentry/replay" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry/cli-darwin@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.31.2.tgz#faeb87d09d8b21b8b8dd2e2aa848b538f01ddd26" + integrity sha512-BHA/JJXj1dlnoZQdK4efRCtHRnbBfzbIZUKAze7oRR1RfNqERI84BVUQeKateD3jWSJXQfEuclIShc61KOpbKw== + +"@sentry/cli-linux-arm64@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.31.2.tgz#669c9c3f7f9130d26f5db732f793378863d58869" + integrity sha512-FLVKkJ/rWvPy/ka7OrUdRW63a/z8HYI1Gt8Pr6rWs50hb7YJja8lM8IO10tYmcFE/tODICsnHO9HTeUg2g2d1w== + +"@sentry/cli-linux-arm@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.31.2.tgz#3e36ed7db09e922f00221281252e58dfd8755ea5" + integrity sha512-W8k5mGYYZz/I/OxZH65YAK7dCkQAl+wbuoASGOQjUy5VDgqH0QJ8kGJufXvFPM+f3ZQGcKAnVsZ6tFqZXETBAw== + +"@sentry/cli-linux-i686@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.31.2.tgz#02b7da274369b78a5676c20bb26cc37caed5244b" + integrity sha512-A64QtzaPi3MYFpZ+Fwmi0mrSyXgeLJ0cWr4jdeTGrzNpeowSteKgd6tRKU+LVq0k5shKE7wdnHk+jXnoajulMA== + +"@sentry/cli-linux-x64@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.31.2.tgz#54f74a9e5925db9ddafebc0efd4056c5377be5fd" + integrity sha512-YL/r+15R4mOEiU3mzn7iFQOeFEUB6KxeKGTTrtpeOGynVUGIdq4nV5rHow5JDbIzOuBS3SpOmcIMluvo1NCh0g== + +"@sentry/cli-win32-i686@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.31.2.tgz#5dab845a824be0927566171aa05f015e887fe82d" + integrity sha512-Az/2bmW+TFI059RE0mSBIxTBcoShIclz7BDebmIoCkZ+retrwAzpmBnBCDAHow+Yi43utOow+3/4idGa2OxcLw== + +"@sentry/cli-win32-x64@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.31.2.tgz#e12fec0a54f6d9cced5235fbc68ba8f94165634b" + integrity sha512-XIzyRnJu539NhpFa+JYkotzVwv3NrZ/4GfHB/JWA2zReRvsk39jJG8D5HOmm0B9JA63QQT7Dt39RW8g3lkmb6w== + +"@sentry/cli@2.31.2": + version "2.31.2" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.31.2.tgz#39df8e52966aa8db4f9c51f4bc77abd62b6a630e" + integrity sha512-2aKyUx6La2P+pplL8+2vO67qJ+c1C79KYWAyQBE0JIT5kvKK9JpwtdNoK1F0/2mRpwhhYPADCz3sVIRqmL8cQQ== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -2869,87 +2869,87 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.30.4" - "@sentry/cli-linux-arm" "2.30.4" - "@sentry/cli-linux-arm64" "2.30.4" - "@sentry/cli-linux-i686" "2.30.4" - "@sentry/cli-linux-x64" "2.30.4" - "@sentry/cli-win32-i686" "2.30.4" - "@sentry/cli-win32-x64" "2.30.4" - -"@sentry/core@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.113.0.tgz#84307eabf03ece9304894ad24ee15581a220c5c7" - integrity sha512-pg75y3C5PG2+ur27A0Re37YTCEnX0liiEU7EOxWDGutH17x3ySwlYqLQmZsFZTSnvzv7t3MGsNZ8nT5O0746YA== - dependencies: - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry/hub@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.113.0.tgz#12f14071f43e657cd36174ba8b06cc955da5492f" - integrity sha512-aoerhlAw3vnY9a27eKAoK862oMXFbyMFWbaZuCeR5gfg7sHsOkVQkCl3yiYfF5hfw9MbwbbY6GqWbCrA89Ci/A== - dependencies: - "@sentry/core" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry/integrations@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.113.0.tgz#cce71e07cf90c4bf9b22f85c3ce22d9ba926ae5a" - integrity sha512-w0sspGBQ+6+V/9bgCkpuM3CGwTYoQEVeTW6iNebFKbtN7MrM3XsGAM9I2cW1jVxFZROqCBPFtd2cs5n0j14aAg== - dependencies: - "@sentry/core" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" + "@sentry/cli-darwin" "2.31.2" + "@sentry/cli-linux-arm" "2.31.2" + "@sentry/cli-linux-arm64" "2.31.2" + "@sentry/cli-linux-i686" "2.31.2" + "@sentry/cli-linux-x64" "2.31.2" + "@sentry/cli-win32-i686" "2.31.2" + "@sentry/cli-win32-x64" "2.31.2" + +"@sentry/core@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.117.0.tgz#eebdb6e700d5fbdf3102c4abfb4ff92ef79ae9a5" + integrity sha512-1XZ4/d/DEwnfM2zBMloXDwX+W7s76lGKQMgd8bwgPJZjjEztMJ7X0uopKAGwlQcjn242q+hsCBR6C+fSuI5kvg== + dependencies: + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry/hub@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.117.0.tgz#924462cd083b57b45559eb5a25850e5b3004a7f8" + integrity sha512-pQrXnbzsRHCUsVIqz/sZ0vggnxuuHqsmyjoy2Ha1qn1Ya4QbyAWEEGoZTnZx6I/Vt3dzVvRnR3YCywatdkaFxg== + dependencies: + "@sentry/core" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry/integrations@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.117.0.tgz#4613dae3bc1d257c3c870461327fd4f70dbda229" + integrity sha512-U3suSZysmU9EiQqg0ga5CxveAyNbi9IVdsapMDq5EQGNcVDvheXtULs+BOc11WYP3Kw2yWB38VDqLepfc/Fg2g== + dependencies: + "@sentry/core" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" localforage "^1.8.1" -"@sentry/react-native@~5.22.0": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-5.22.3.tgz#89f451361bfaf37966ddba5aa42839eeee5e6344" - integrity sha512-CjMHCpsrMGwplna+ILSr+SN97LY5Ggw/JDTrsnhijpiKVMO8bDpeOdwfprAhX8DzaNHPkqKBXRTdbsr620WzZQ== - dependencies: - "@sentry/browser" "7.113.0" - "@sentry/cli" "2.30.4" - "@sentry/core" "7.113.0" - "@sentry/hub" "7.113.0" - "@sentry/integrations" "7.113.0" - "@sentry/react" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" - -"@sentry/react@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.113.0.tgz#8e21c92e9691ea881639596d7e60a996b23ba229" - integrity sha512-+zVPz+h5Wydq4ntekw3/dXq5jeHIpZoQ2iqhB96PA9Y94JIq178i/xIP204S1h6rN7cmWAqtR93vnPKdxnlUbQ== - dependencies: - "@sentry/browser" "7.113.0" - "@sentry/core" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" +"@sentry/react-native@~5.24.3": + version "5.24.3" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-5.24.3.tgz#debd2218f65b4112b8513468ac3ffef42713c4f1" + integrity sha512-KBtXSYzk4Ge9GX4e7520oHhmo6UqGl3rH627Xpl3Gxmh9psQsLDmYXVKiMOFBZrSBAv7FAV0jf6zERK8lNY/Gg== + dependencies: + "@sentry/browser" "7.117.0" + "@sentry/cli" "2.31.2" + "@sentry/core" "7.117.0" + "@sentry/hub" "7.117.0" + "@sentry/integrations" "7.117.0" + "@sentry/react" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" + +"@sentry/react@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.117.0.tgz#0a6e729f5d17782a02a48728821536ede569bc8d" + integrity sha512-aK+yaEP2esBhaczGU96Y7wkqB4umSIlRAzobv7ER88EGHzZulRaocTpQO8HJJGDHm4D8rD+E893BHnghkoqp4Q== + dependencies: + "@sentry/browser" "7.117.0" + "@sentry/core" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" hoist-non-react-statics "^3.3.2" -"@sentry/replay@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.113.0.tgz#db41b792e5d9966a9b1ca4eb1695ad7100f39b50" - integrity sha512-UD2IaphOWKFdeGR+ZiaNAQ+wFsnwbJK6PNwcW6cHmWKv9COlKufpFt06lviaqFZ8jmNrM4H+r+R8YVTrqCuxgg== +"@sentry/replay@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.117.0.tgz#c41844b60ad5d711d663a562e2df77fe14c51bbb" + integrity sha512-V4DfU+x4UsA4BsufbQ8jHYa5H0q5PYUgso2X1PR31g1fpx7yiYguSmCfz1UryM6KkH92dfTnqXapDB44kXOqzQ== dependencies: - "@sentry-internal/tracing" "7.113.0" - "@sentry/core" "7.113.0" - "@sentry/types" "7.113.0" - "@sentry/utils" "7.113.0" + "@sentry-internal/tracing" "7.117.0" + "@sentry/core" "7.117.0" + "@sentry/types" "7.117.0" + "@sentry/utils" "7.117.0" -"@sentry/types@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.113.0.tgz#2193c9933838302c82814771b03a8647fa684ffb" - integrity sha512-PJbTbvkcPu/LuRwwXB1He8m+GjDDLKBtu3lWg5xOZaF5IRdXQU2xwtdXXsjge4PZR00tF7MO7X8ZynTgWbYaew== +"@sentry/types@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.117.0.tgz#c4d89aba487c05f4e5cbfa2f1c65180b536393b4" + integrity sha512-5dtdulcUttc3F0Te7ekZmpSp/ebt/CA71ELx0uyqVGjWsSAINwskFD77sdcjqvZWek//WjiYX1+GRKlpJ1QqsA== -"@sentry/utils@7.113.0": - version "7.113.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.113.0.tgz#1e6e790c9d84e4809b2bb529bbd33a506b6db7bd" - integrity sha512-nzKsErwmze1mmEsbW2AwL2oB+I5v6cDEJY4sdfLekA4qZbYZ8pV5iWza6IRl4XfzGTE1qpkZmEjPU9eyo0yvYw== +"@sentry/utils@7.117.0": + version "7.117.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.117.0.tgz#ac367a6f623bd09440b39d947437009c0ffe52b2" + integrity sha512-KkcLY8643SGBiDyPvMQOubBkwVX5IPknMHInc7jYC8pDVncGp7C65Wi506bCNPpKCWspUd/0VDNWOOen51/qKA== dependencies: - "@sentry/types" "7.113.0" + "@sentry/types" "7.117.0" "@sideway/address@^4.1.5": version "4.1.5" From f149af4c4bfd1c8eabd7baa4e1bdf877996e4ada Mon Sep 17 00:00:00 2001 From: im-adithya Date: Tue, 29 Oct 2024 18:58:26 +0530 Subject: [PATCH 4/7] chore: comment out sample dsn --- app/_layout.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index e509143..bb4cf67 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -21,12 +21,7 @@ import { useAppStore } from "~/lib/state/appStore"; import { useColorScheme } from "~/lib/useColorScheme"; Sentry.init({ - dsn: "https://ingest.us.sentry.io/key", - - // Set tracesSampleRate to 1.0 to capture 100% - // of transactions for tracing. - // We recommend adjusting this value in production - tracesSampleRate: 1.0, + // dsn: "https://ingest.us.sentry.io/key", }); const LIGHT_THEME: Theme = { From 7f9edb0c43c685a0e7c2b0a9e9b3adc5d712f289 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Tue, 29 Oct 2024 20:41:42 +0530 Subject: [PATCH 5/7] chore: add sentry auth token to workflow --- .github/workflows/pull_requests.yml | 2 ++ .github/workflows/release.yml | 7 ++++--- .gitignore | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 1b93858..ae4fbe7 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -30,6 +30,8 @@ jobs: run: yarn install - name: ๐Ÿš€ Build app + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: eas build --non-interactive --platform android --local --profile preview --output=./app-release.apk - name: ๐Ÿงช Run tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25d7dce..996164d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release tag on: push: tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: draft_release: @@ -22,7 +22,7 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: true -# prerelease: true + # prerelease: true build_android: needs: [draft_release] @@ -53,6 +53,8 @@ jobs: run: yarn install - name: ๐Ÿš€ Build app + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: eas build --non-interactive --platform android --local --profile production_apk --output=./app-release.apk - name: Upload Artifact @@ -71,7 +73,6 @@ jobs: asset_path: ./app-release.apk asset_name: alby-go-${{ github.ref_name }}-android.apk asset_content_type: application/vnd.android.package-archive - # publish-release: # needs: [release, build_android] # runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 45e61cc..62e63ad 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ yarn-error.* # local env files .env*.local +.env # typescript *.tsbuildinfo From f1750af02ecc9d0a9650d8393ecf95a789844518 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 30 Oct 2024 15:19:35 +0530 Subject: [PATCH 6/7] chore: add dsn to env and workflow --- .github/workflows/release.yml | 1 + app/_layout.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 996164d..8ed3c90 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,7 @@ jobs: - name: ๐Ÿš€ Build app env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} run: eas build --non-interactive --platform android --local --profile production_apk --output=./app-release.apk - name: Upload Artifact diff --git a/app/_layout.tsx b/app/_layout.tsx index bb4cf67..0e927dc 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -21,7 +21,7 @@ import { useAppStore } from "~/lib/state/appStore"; import { useColorScheme } from "~/lib/useColorScheme"; Sentry.init({ - // dsn: "https://ingest.us.sentry.io/key", + dsn: process.env.SENTRY_DSN, }); const LIGHT_THEME: Theme = { From 0752ca21bd3a6c78116de58cf9e50ce09ab1620d Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 30 Oct 2024 15:31:56 +0530 Subject: [PATCH 7/7] chore: add ios privacy manifest for sentry sdk to work --- app.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/app.json b/app.json index 4225c9b..4dea3d3 100644 --- a/app.json +++ b/app.json @@ -54,6 +54,48 @@ "bundleIdentifier": "com.getalby.mobile", "config": { "usesNonExemptEncryption": false + }, + "privacyManifests": { + "NSPrivacyCollectedDataTypes": [ + { + "NSPrivacyCollectedDataType": "NSPrivacyCollectedDataTypeCrashData", + "NSPrivacyCollectedDataTypeLinked": false, + "NSPrivacyCollectedDataTypeTracking": false, + "NSPrivacyCollectedDataTypePurposes": [ + "NSPrivacyCollectedDataTypePurposeAppFunctionality" + ] + }, + { + "NSPrivacyCollectedDataType": "NSPrivacyCollectedDataTypePerformanceData", + "NSPrivacyCollectedDataTypeLinked": false, + "NSPrivacyCollectedDataTypeTracking": false, + "NSPrivacyCollectedDataTypePurposes": [ + "NSPrivacyCollectedDataTypePurposeAppFunctionality" + ] + }, + { + "NSPrivacyCollectedDataType": "NSPrivacyCollectedDataTypeOtherDiagnosticData", + "NSPrivacyCollectedDataTypeLinked": false, + "NSPrivacyCollectedDataTypeTracking": false, + "NSPrivacyCollectedDataTypePurposes": [ + "NSPrivacyCollectedDataTypePurposeAppFunctionality" + ] + } + ], + "NSPrivacyAccessedAPITypes": [ + { + "NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategoryUserDefaults", + "NSPrivacyAccessedAPITypeReasons": ["CA92.1"] + }, + { + "NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategorySystemBootTime", + "NSPrivacyAccessedAPITypeReasons": ["35F9.1"] + }, + { + "NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategoryFileTimestamp", + "NSPrivacyAccessedAPITypeReasons": ["C617.1"] + } + ] } }, "android": {