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

feat: [IOPLT-305] Add Sentry Tool for Crash reporting #5756

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f654db5
chore: sentry initial
CrisTofani May 9, 2024
1a48589
chore: ignore sentry.properties file
CrisTofani May 9, 2024
9aa5ba6
chore: Sentry completed setup and CI adjustments
CrisTofani May 9, 2024
90a64a5
fix: remove any type
CrisTofani May 9, 2024
2509509
Adds button to send test event
CrisTofani May 9, 2024
12d3453
fixes test executiion
CrisTofani May 10, 2024
60e8b76
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 10, 2024
443d348
Update ts/App.tsx
CrisTofani May 13, 2024
231083f
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 13, 2024
cfd5738
chore: suggestions from code rev
CrisTofani May 13, 2024
5ad2553
fix: privacy manifest changes
CrisTofani May 13, 2024
8a5121f
Revert "fix: privacy manifest changes"
CrisTofani May 13, 2024
6581d0a
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 13, 2024
aa1fef4
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 15, 2024
3d4bb70
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 15, 2024
bebddfc
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 21, 2024
ee2f33c
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 22, 2024
8861571
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 23, 2024
40200c4
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani May 27, 2024
5887d93
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 3, 2024
df1fa5b
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 14, 2024
d37a6b8
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 17, 2024
9a4ffe3
renames test error to track
CrisTofani Jun 17, 2024
2862c74
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 20, 2024
51585ad
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 25, 2024
0a635a8
Merge remote-tracking branch 'origin/master' into IOPLT-305-add-sentr…
CrisTofani Jun 25, 2024
6f206a8
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 25, 2024
3a93fe9
Merge branch 'master' into IOPLT-305-add-sentry-sdk-1
CrisTofani Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ ZENDESK_PRIVACY_URL='https://www.pagopa.it/it/privacy-policy-assistenza/'
# Mixpanel
MIXPANEL_URL='https://api-eu.mixpanel.com'
MIXPANEL_TOKEN='0cb505dace6f4b3ceb9e17c7fcd7c66f'
# Sentry
# This can be public as per docs https://docs.sentry.io/concepts/key-terms/dsn-explainer/#dsn-utilization
SENTRY_DSN='https://43b87dcfc91f9cfdfaf71b254eb8f58e@o4507197393469440.ingest.de.sentry.io/4507221483585616'
# Test overlay caption, if the string is nonempty will be displayed in the TestOverlay
# TEST_OVERLAY_CAPTION='Functionality name here!'
# enable playgrounds inside developer section
Expand Down
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ ZENDESK_PRIVACY_URL='https://www.pagopa.it/it/privacy-policy-assistenza/'
# Mixpanel
MIXPANEL_URL='https://api-eu.mixpanel.com'
MIXPANEL_TOKEN='0cb505dace6f4b3ceb9e17c7fcd7c66f'
# Sentry
# This can be public as per docs https://docs.sentry.io/concepts/key-terms/dsn-explainer/#dsn-utilization
SENTRY_DSN='https://43b87dcfc91f9cfdfaf71b254eb8f58e@o4507197393469440.ingest.de.sentry.io/4507221483585616'
# Test overlay caption, if the string is nonempty will be displayed in the TestOverlay
# TEST_OVERLAY_CAPTION='Functionality name here!'
# enable playgrounds inside developer section
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-fl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
ENCODED_IOAPP_GOOGLE_SERVICES_JSON_FILE: ${{secrets.ENCODED_IOAPP_GOOGLE_SERVICES_JSON_FILE}}
ENCODED_IOAPP_JSON_KEY_FILE: ${{secrets.ENCODED_IOAPP_JSON_KEY_FILE}}
ENCODED_IO_APP_RELEASE_KEYSTORE: ${{secrets.ENCODED_IO_APP_RELEASE_KEYSTORE}}
ENCODED_IO_APP_SENTRY_PROPERTIES: ${{secrets.ENCODED_IO_APP_SENTRY_PROPERTIES}}
IO_APP_RELEASE_STORE_FILE : ${{secrets.IO_APP_RELEASE_STORE_FILE}}
IO_APP_RELEASE_STORE_PASSWORD: ${{secrets.IO_APP_RELEASE_STORE_PASSWORD}}
IO_APP_RELEASE_KEY_ALIAS: ${{secrets.IO_APP_RELEASE_KEY_ALIAS}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
ENCODED_IOAPP_GOOGLE_SERVICES_JSON_FILE: ${{secrets.ENCODED_IOAPP_GOOGLE_SERVICES_JSON_FILE}}
ENCODED_IOAPP_JSON_KEY_FILE: ${{secrets.ENCODED_IOAPP_JSON_KEY_FILE}}
ENCODED_IO_APP_RELEASE_KEYSTORE: ${{secrets.ENCODED_IO_APP_RELEASE_KEYSTORE}}
ENCODED_IO_APP_SENTRY_PROPERTIES: ${{secrets.ENCODED_IO_APP_SENTRY_PROPERTIES}}
IO_APP_RELEASE_STORE_FILE : ${{secrets.IO_APP_RELEASE_STORE_FILE}}
IO_APP_RELEASE_STORE_PASSWORD: ${{secrets.IO_APP_RELEASE_STORE_PASSWORD}}
IO_APP_RELEASE_KEY_ALIAS: ${{secrets.IO_APP_RELEASE_KEY_ALIAS}}
Expand Down Expand Up @@ -67,6 +68,7 @@ jobs:
env:
APP_STORE_API_KEY_ID: ${{secrets.APP_STORE_API_KEY_ID}}
APP_STORE_API_PRIVATE_KEY: ${{secrets.APP_STORE_API_PRIVATE_KEY}}
ENCODED_IO_APP_SENTRY_PROPERTIES: ${{secrets.ENCODED_IO_APP_SENTRY_PROPERTIES}}
- id: add-ssh-deploy-key
run: |
echo -e "Host github.com
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ android/app/google-services.json
GeneratedDotEnv.m

# XState Typegen
**/*.typegen.*
**/*.typegen.*

# Sentry prop file
sentry.properties
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def reactNativeArchitectures() {
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

apply from: new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute().text.trim(), "../sentry.gradle")
shadowsheep1 marked this conversation as resolved.
Show resolved Hide resolved
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable functional/immutable-data */
/**
* Main app entrypoint
*/
Expand Down Expand Up @@ -38,6 +39,7 @@ const errorHandler = (e, isFatal) => {
`
);
} else {
// eslint-disable-next-line no-console
console.log(e); // So that we can see it in the ADB logs in case of Android if needed
}
};
Expand Down
19 changes: 19 additions & 0 deletions ios/ItaliaApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@
7A034949213D55CA0064B689 /* Work around InputMask.xcodeproj embedding an extra set of Swift libraries */,
520BD832C8035EF5E68D9913 /* [CP] Embed Pods Frameworks */,
963519164D766C5238AA1B42 /* [CP] Copy Pods Resources */,
749771495C064EBF91231ED5 /* Upload Debug Symbols to Sentry */,
);
buildRules = (
);
Expand Down Expand Up @@ -544,16 +545,32 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ItaliaApp-ItaliaAppTests/Pods-ItaliaApp-ItaliaAppTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/Sentry/Sentry.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Sentry.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ItaliaApp-ItaliaAppTests/Pods-ItaliaApp-ItaliaAppTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
749771495C064EBF91231ED5 /* Upload Debug Symbols to Sentry */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Upload Debug Symbols to Sentry";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh";
};
7A034949213D55CA0064B689 /* Work around InputMask.xcodeproj embedding an extra set of Swift libraries */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -594,10 +611,12 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ItaliaApp/Pods-ItaliaApp-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/Sentry/Sentry.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Sentry.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down