diff --git a/.gitmodules b/.gitmodules index edee481b4f..9256cddd4b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -114,3 +114,6 @@ [submodule "vendor/qzxing"] path = vendor/qzxing url = https://github.com/status-im/qzxing.git +[submodule "vendor/sentry-native"] + path = vendor/sentry-native + url = https://github.com/getsentry/sentry-native.git diff --git a/ui/StatusQ/CMakeLists.txt b/ui/StatusQ/CMakeLists.txt index 0794b6b380..e59e100fc5 100644 --- a/ui/StatusQ/CMakeLists.txt +++ b/ui/StatusQ/CMakeLists.txt @@ -35,6 +35,7 @@ endif() add_subdirectory(../../vendor/SortFilterProxyModel SortFilterProxyModel) add_subdirectory(../../vendor/qzxing/src qzxing) +add_subdirectory(../../vendor/sentry-native sentry-native) target_compile_options(qzxing PRIVATE -w) target_compile_options(SortFilterProxyModel PRIVATE -w) @@ -186,6 +187,7 @@ target_link_libraries(StatusQ PRIVATE Qt5::QuickControls2 SortFilterProxyModel qzxing + sentry::sentry ) if (CMAKE_BUILD_TYPE STREQUAL "Debug") diff --git a/vendor/DOtherSide/lib/src/DOtherSide.cpp b/vendor/DOtherSide/lib/src/DOtherSide.cpp index 286751d17d..e8e0ff0263 100644 --- a/vendor/DOtherSide/lib/src/DOtherSide.cpp +++ b/vendor/DOtherSide/lib/src/DOtherSide.cpp @@ -215,6 +215,18 @@ void dos_installMessageHandler(MessageHandlerCallback messageHandler) void dos_qguiapplication_create() { + sentry_options_t *options = sentry_options_new(); + // sentry_options_set_dsn(options, "https://fecdd38f76baa59481dd8b643bd54022@sentry.infra.status.im/8"); + // This is also the default-path. For further information and recommendations: + // https://docs.sentry.io/platforms/native/configuration/options/#database-path + sentry_options_set_database_path(options, ".sentry-native"); + sentry_options_set_release(options, "status-desktop@x.y.z"); + sentry_options_set_debug(options, 1); + sentry_init(options); + + // Make sure everything flushes + auto sentryClose = qScopeGuard([] { sentry_close(); }); + // The parameters argc and argv and the strings pointed to by the argv array shall be modifiable by the program, // and retain their last-stored values between program startup and program termination. // In other words: argv strings can't be string literals! diff --git a/vendor/sentry-native b/vendor/sentry-native new file mode 160000 index 0000000000..b598af00f6 --- /dev/null +++ b/vendor/sentry-native @@ -0,0 +1 @@ +Subproject commit b598af00f666ec01842f1b56e17c596e483fb7b5