-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: native crash reporting (#2887)
Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
- Loading branch information
1 parent
f473889
commit 217c11c
Showing
31 changed files
with
1,000 additions
and
95 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ test_output/ | |
test/**/*.apk | ||
/tools/ | ||
*.log | ||
.sentry-native |
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
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,35 @@ | ||
/* | ||
* This sample demonstrates a native crash handling in a NativeAOT published application. | ||
*/ | ||
using Sentry; | ||
|
||
// Initialize the Sentry SDK. (It is not necessary to dispose it.) | ||
SentrySdk.Init(options => | ||
{ | ||
// A Sentry Data Source Name (DSN) is required. | ||
// See https://docs.sentry.io/product/sentry-basics/dsn-explainer/ | ||
// You can set it in the SENTRY_DSN environment variable, or you can set it in code here. | ||
// options.Dsn = "... Your DSN ..."; | ||
// When debug is enabled, the Sentry client will emit detailed debugging information to the console. | ||
// This might be helpful, or might interfere with the normal operation of your application. | ||
// We enable it here for demonstration purposes. | ||
// You should not do this in your applications unless you are troubleshooting issues with Sentry. | ||
options.Debug = true; | ||
}); | ||
|
||
await FirstFunctionAsync(); | ||
|
||
async Task FirstFunctionAsync() | ||
{ | ||
await Task.Delay(100); | ||
await SecondFunctionAsync(); | ||
} | ||
|
||
async Task SecondFunctionAsync() | ||
{ | ||
await Task.Delay(100); | ||
#pragma warning disable CS0618 | ||
SentrySdk.CauseCrash(CrashType.Native); | ||
#pragma warning restore CS0618 | ||
} |
Oops, something went wrong.