Skip to content

Commit

Permalink
chore: add sentry for error tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron committed Sep 4, 2024
1 parent 126a968 commit 69cd494
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ yarn-error.*

# typescript
*.tsbuildinfo

.env.local
12 changes: 10 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -65,4 +73,4 @@
},
"owner": "roland_alby"
}
}
}
5 changes: 5 additions & 0 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -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" });
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -63,4 +64,4 @@
"typescript": "~5.3.3"
},
"private": true
}
}
Loading

0 comments on commit 69cd494

Please sign in to comment.