Skip to content

Commit 217c11c

Browse files
vaindbruno-garcia
andauthored
Feat: native crash reporting (#2887)
Co-authored-by: Bruno Garcia <[email protected]>
1 parent f473889 commit 217c11c

31 files changed

+1000
-95
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
key: sentry-native-${{ runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
3232
enableCrossOsArchive: true
3333

34+
- name: Install build dependencies
35+
if: steps.cache.outputs.cache-hit != 'true' && runner.os == 'Linux'
36+
run: |
37+
sudo apt update
38+
sudo apt install libcurl4-openssl-dev
39+
3440
- run: scripts/build-sentry-native.ps1
3541
if: steps.cache.outputs.cache-hit != 'true'
3642
shell: pwsh
@@ -157,6 +163,12 @@ jobs:
157163
name: ${{ github.sha }}
158164
path: src
159165

166+
- name: Install build dependencies
167+
if: runner.os == 'Linux'
168+
run: |
169+
sudo apt update
170+
sudo apt install libcurl4-openssl-dev
171+
160172
- uses: actions/setup-dotnet@v3
161173
with:
162174
dotnet-version: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ test_output/
2525
test/**/*.apk
2626
/tools/
2727
*.log
28+
.sentry-native

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Features
6+
7+
- Native crash reporting on NativeAOT published apps (Windows, Linux, macOS). ([#2887](https://github.com/getsentry/sentry-dotnet/pull/2887))
8+
59
### API breaking Changes
610

711
#### Removed APIs

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@ For big feature it's advised to raise an issue to discuss it first.
1414
## Dependencies
1515

1616
* The latest versions of the following .NET SDKs:
17-
- [.NET 7.0](https://dotnet.microsoft.com/download/dotnet/7.0)
17+
- [.NET 8.0](https://dotnet.microsoft.com/download/dotnet/8.0)
1818
- [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
1919

20-
*Technically, you only need the full SDK install for the latest version (7.0). If you like, you can install the smaller ASP.NET Core Runtime packages for .NET 6.0 . However, installing the full SDKs will also give you the runtimes.*
20+
*Technically, you only need the full SDK install for the latest version (8.0). If you like, you can install the smaller ASP.NET Core Runtime packages for .NET 6.0 . However, installing the full SDKs will also give you the runtimes.*
2121

2222
*If using an M1 ("Apple silicon") processor, read [the special instructions below](#special-instructions-for-apple-silicon-cpus).*
2323

24+
* You'll need `CMake` somewhere on your PATH. If you don't already have this, one way to get it is to install the [C++ CMake tools for Windows](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170#installation)
25+
26+
* You'll need [`pwsh`](https://github.com/PowerShell/PowerShell#get-powershell) on PATH.
27+
2428
* On Windows:
2529
- [.NET Framework](https://dotnet.microsoft.com/download/dotnet-framework) 4.6.2 or higher.
26-
- You'll need `CMake` somewhere on your PATH. If you don't already have this, one way to get it is to install the [C++ CMake tools for Windows](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170#installation)
2730
- `Sentry.DiagnosticSource.IntegrationTests.csproj` uses [SQL LocalDb](https://docs.microsoft.com/sql/database-engine/configure-windows/sql-server-express-localdb) - [download SQL LocalDB 2019](https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi). To avoid running these tests, unload `Sentry.DiagnosticSource.IntegrationTests.csproj` from the solution.
2831
* On macOS/Linux
2932
- [Mono 6 or higher](https://www.mono-project.com/download/stable) to run the unit tests on the `net4x` targets.

Sentry-CI-Build-Linux.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj",
1515
"samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj",
1616
"samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj",
17+
"samples\\Sentry.Samples.Console.Native\\Sentry.Samples.Console.Native.csproj",
1718
"samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj",
1819
"samples\\Sentry.Samples.EntityFramework\\Sentry.Samples.EntityFramework.csproj",
1920
"samples\\Sentry.Samples.GenericHost\\Sentry.Samples.GenericHost.csproj",

Sentry-CI-Build-Windows.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj",
1414
"samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj",
1515
"samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj",
16+
"samples\\Sentry.Samples.Console.Native\\Sentry.Samples.Console.Native.csproj",
1617
"samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj",
1718
"samples\\Sentry.Samples.EntityFramework\\Sentry.Samples.EntityFramework.csproj",
1819
"samples\\Sentry.Samples.GenericHost\\Sentry.Samples.GenericHost.csproj",

Sentry-CI-Build-macOS.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj",
1616
"samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj",
1717
"samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj",
18+
"samples\\Sentry.Samples.Console.Native\\Sentry.Samples.Console.Native.csproj",
1819
"samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj",
1920
"samples\\Sentry.Samples.EntityFramework\\Sentry.Samples.EntityFramework.csproj",
2021
"samples\\Sentry.Samples.GenericHost\\Sentry.Samples.GenericHost.csproj",

Sentry.NoMobile.sln

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceEvent", "modules\perfv
161161
EndProject
162162
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastSerialization", "modules\perfview\src\FastSerialization\FastSerialization.csproj", "{8032310D-3C06-442C-A318-F365BCC4C804}"
163163
EndProject
164+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Native", "samples\Sentry.Samples.Console.Native\Sentry.Samples.Console.Native.csproj", "{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}"
165+
EndProject
164166
Global
165167
GlobalSection(SolutionConfigurationPlatforms) = preSolution
166168
Debug|Any CPU = Debug|Any CPU
167169
Release|Any CPU = Release|Any CPU
168170
EndGlobalSection
169-
GlobalSection(SolutionProperties) = preSolution
170-
HideSolutionNode = FALSE
171-
EndGlobalSection
172171
GlobalSection(ProjectConfigurationPlatforms) = postSolution
173172
{8328B70C-B808-4ED1-BB16-8555B2752CB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
174173
{8328B70C-B808-4ED1-BB16-8555B2752CB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -462,6 +461,13 @@ Global
462461
{8032310D-3C06-442C-A318-F365BCC4C804}.Debug|Any CPU.Build.0 = Debug|Any CPU
463462
{8032310D-3C06-442C-A318-F365BCC4C804}.Release|Any CPU.ActiveCfg = Release|Any CPU
464463
{8032310D-3C06-442C-A318-F365BCC4C804}.Release|Any CPU.Build.0 = Release|Any CPU
464+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
465+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
466+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
467+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Release|Any CPU.Build.0 = Release|Any CPU
468+
EndGlobalSection
469+
GlobalSection(SolutionProperties) = preSolution
470+
HideSolutionNode = FALSE
465471
EndGlobalSection
466472
GlobalSection(NestedProjects) = preSolution
467473
{8328B70C-B808-4ED1-BB16-8555B2752CB6} = {7D4D7A6A-3F5C-4B4C-A198-AC51F9220231}
@@ -538,5 +544,6 @@ Global
538544
{162A1CAE-ACEE-45CA-A6D0-7702ADE4D3DE} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
539545
{67269916-C417-4CEE-BD7D-CA66C3830AEE} = {A3CCA27E-4DF8-479D-833C-CAA0950715AA}
540546
{8032310D-3C06-442C-A318-F365BCC4C804} = {A3CCA27E-4DF8-479D-833C-CAA0950715AA}
547+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
541548
EndGlobalSection
542549
EndGlobal

Sentry.sln

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceEvent", "modules\perfv
161161
EndProject
162162
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastSerialization", "modules\perfview\src\FastSerialization\FastSerialization.csproj", "{8032310D-3C06-442C-A318-F365BCC4C804}"
163163
EndProject
164+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Native", "samples\Sentry.Samples.Console.Native\Sentry.Samples.Console.Native.csproj", "{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}"
165+
EndProject
164166
Global
165167
GlobalSection(SolutionConfigurationPlatforms) = preSolution
166168
Debug|Any CPU = Debug|Any CPU
167169
Release|Any CPU = Release|Any CPU
168170
EndGlobalSection
169-
GlobalSection(SolutionProperties) = preSolution
170-
HideSolutionNode = FALSE
171-
EndGlobalSection
172171
GlobalSection(ProjectConfigurationPlatforms) = postSolution
173172
{8328B70C-B808-4ED1-BB16-8555B2752CB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
174173
{8328B70C-B808-4ED1-BB16-8555B2752CB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -462,6 +461,13 @@ Global
462461
{8032310D-3C06-442C-A318-F365BCC4C804}.Debug|Any CPU.Build.0 = Debug|Any CPU
463462
{8032310D-3C06-442C-A318-F365BCC4C804}.Release|Any CPU.ActiveCfg = Release|Any CPU
464463
{8032310D-3C06-442C-A318-F365BCC4C804}.Release|Any CPU.Build.0 = Release|Any CPU
464+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
465+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
466+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
467+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2}.Release|Any CPU.Build.0 = Release|Any CPU
468+
EndGlobalSection
469+
GlobalSection(SolutionProperties) = preSolution
470+
HideSolutionNode = FALSE
465471
EndGlobalSection
466472
GlobalSection(NestedProjects) = preSolution
467473
{8328B70C-B808-4ED1-BB16-8555B2752CB6} = {7D4D7A6A-3F5C-4B4C-A198-AC51F9220231}
@@ -538,5 +544,6 @@ Global
538544
{162A1CAE-ACEE-45CA-A6D0-7702ADE4D3DE} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
539545
{67269916-C417-4CEE-BD7D-CA66C3830AEE} = {A3CCA27E-4DF8-479D-833C-CAA0950715AA}
540546
{8032310D-3C06-442C-A318-F365BCC4C804} = {A3CCA27E-4DF8-479D-833C-CAA0950715AA}
547+
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
541548
EndGlobalSection
542549
EndGlobal

SentryNoMobile.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj",
1414
"samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj",
1515
"samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj",
16+
"samples\\Sentry.Samples.Console.Native\\Sentry.Samples.Console.Native.csproj",
1617
"samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj",
1718
"samples\\Sentry.Samples.EntityFramework\\Sentry.Samples.EntityFramework.csproj",
1819
"samples\\Sentry.Samples.GenericHost\\Sentry.Samples.GenericHost.csproj",

0 commit comments

Comments
 (0)