-
Notifications
You must be signed in to change notification settings - Fork 119
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
Cross-Plattform Crash Reporting: Add Android Support #4484
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e4cb5a8
Sentry WIP
strseb 46f1f65
Make it a proper integration
strseb 5cbeabc
Fix fallback for unsupported plattforms
strseb e4c130c
Proper windows support
strseb 0de8f4e
Cleanups
strseb 99e2bb8
dummy version for qmake variants
strseb 4e21482
add license
strseb b6a230e
cleanup
strseb 3d66f6c
cleanup
strseb a875fb0
Address feedback
strseb 32651fe
add mit license
strseb 10c86a3
Add sentry as submodule
strseb a26b64d
Add Android support for sentry
strseb b5ec882
add cmake do dockerimage
strseb c625264
Increase checkout depth
strseb 7d1bec1
HM
strseb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sentry_native
added at
b0fab1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
|
||
# This CMAKE File will Integrate Sentry into MVPN | ||
|
||
|
||
# Defines which OS builds can include sentry. Check src/cmake Lists for all values of MVPN_PLATFORM_NAME | ||
set(SENTRY_SUPPORTED_OS "Windows" "Darwin") | ||
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external) | ||
include(ExternalProject) | ||
|
||
|
||
|
||
LIST(FIND SENTRY_SUPPORTED_OS ${CMAKE_SYSTEM_NAME} _SUPPORTED) | ||
|
||
if( ${_SUPPORTED} GREATER -1 ) | ||
message("Building sentry for ${CMAKE_SYSTEM_NAME}") | ||
target_compile_definitions(mozillavpn PRIVATE SENTRY_ENABLED) | ||
# Sentry support is given | ||
target_sources(mozillavpn PRIVATE | ||
sentry/sentryadapter.cpp | ||
sentry/sentryadapter.h | ||
) | ||
|
||
# Configure Linking and Compile | ||
if(APPLE) | ||
# Compile Static for apple and link to libsentry.a | ||
target_link_libraries(mozillavpn PUBLIC libsentry.a) | ||
SET(SENTRY_ARGS -DSENTRY_BUILD_SHARED_LIBS=false) | ||
osx_bundle_files(mozillavpn | ||
FILES ${CMAKE_BINARY_DIR}/external/bin/crashpad_handler | ||
DESTINATION MacOS | ||
) | ||
endif() | ||
if(WIN32) | ||
SET(SENTRY_ARGS -DSENTRY_BUILD_SHARED_LIBS=false -D SENTRY_BACKEND=breakpad) | ||
# Link against static sentry + breakpad + the stack unwind utils | ||
target_link_libraries(mozillavpn PUBLIC sentry.lib) | ||
target_link_libraries(mozillavpn PUBLIC breakpad_client.lib) | ||
target_link_libraries(mozillavpn PUBLIC dbghelp.lib) | ||
# Make sure the sentry header does not try to dll-link it :) | ||
target_compile_definitions(mozillavpn PRIVATE SENTRY_BUILD_STATIC) | ||
|
||
endif() | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(sentry | ||
GIT_REPOSITORY https://github.com/getsentry/sentry-native/ | ||
GIT_TAG 0.5.0 | ||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} ${SENTRY_ARGS} | ||
) | ||
|
||
target_include_directories(mozillavpn PUBLIC ${EXTERNAL_INSTALL_LOCATION}/include) | ||
target_link_directories( mozillavpn PUBLIC ${EXTERNAL_INSTALL_LOCATION}/lib) | ||
add_dependencies(mozillavpn sentry) | ||
else() | ||
message("Sentry supported OS -> ${SENTRY_SUPPORTED_OS}") | ||
message("Skipping building sentry for ${CMAKE_SYSTEM_NAME}") | ||
# Sentry is not supported on this Plattform, let's | ||
# only include a dummy client :) | ||
target_sources(mozillavpn PRIVATE | ||
sentry/dummysentryadapter.cpp | ||
sentry/sentryadapter.h | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,13 @@ CONSTEXPR(uint32_t, controllerPeriodicStateRecorderMsec, 10800000, 60000, 0) | |
#define PRODBETAEXPR(type, functionName, prod, beta) \ | ||
inline type functionName() { return inProduction() ? prod : beta; } | ||
|
||
// TODO: Get a mozilla one - this is bastis project :) | ||
constexpr const char* SENTRY_DER = | ||
"https://[email protected]/" | ||
"6719480"; | ||
constexpr const char* SENTRY_ENVELOPE_INGESTION = | ||
"https://o1396220.ingest.sentry.io/api/6719480/envelope/"; | ||
|
||
constexpr const char* API_PRODUCTION_URL = "https://vpn.mozilla.org"; | ||
constexpr const char* API_STAGING_URL = | ||
"https://stage-vpn.guardian.nonprod.cloudops.mozgcp.net"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
android{ | ||
LIBS += $$PWD/../../.tmp/sentry_install/lib/libsentry.a | ||
LIBS += $$PWD/../../.tmp/sentry_install/lib/libunwindstack.a | ||
INCLUDEPATH += $$PWD/../../.tmp/sentry_install/include | ||
SOURCES += sentry/sentryadapter.cpp | ||
DEFINES += SENTRY_ENABLED | ||
|
||
# We need custom transport on android | ||
DEFINES += SENTRY_TRANSPORT_ENABLED | ||
}else{ | ||
SOURCES += sentry/dummysentryadapter.cpp | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the sentry_native repo itself has submodules:
https://github.com/getsentry/sentry-native/tree/master/external