Skip to content

Commit 8d57c40

Browse files
committed
issue fingerprint using package.json app version
1 parent 5622c59 commit 8d57c40

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/App.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ const reactNavigationV5Instrumentation = new Sentry.ReactNavigationV5Instrumenta
3030
},
3131
);
3232

33+
// Get app version from package.json, for fingerprinting
34+
const packageJson = require('../package.json');
35+
3336
Sentry.init({
3437
dsn: DSN,
3538
environment: "dev",
36-
beforeSend: (e) => {
37-
return e;
39+
beforeSend: (event) => {
40+
// Makes issues unique to the release (app version)
41+
event.fingerprint = ['{{ default }}', packageJson.version ];
42+
return event;
3843
},
3944
integrations: [
4045
new Sentry.ReactNativeTracing({
@@ -57,11 +62,6 @@ Sentry.init({
5762
// debug: true
5863
});
5964

60-
// See if anything different when this is in Saucelabs
61-
console.log("> PROCESS", process) // logs > PROCESS {"env": {"NODE_ENV": "development"}}
62-
Sentry.setContext("process", process);
63-
Sentry.captureMessage("message for context")
64-
6565
const Stack = createStackNavigator();
6666

6767
const App = () => {

0 commit comments

Comments
 (0)