Skip to content

Commit 1c6494e

Browse files
Merge branch 'main' into store-v2
2 parents d18d462 + cdbb4bc commit 1c6494e

26 files changed

+202
-48
lines changed

CHANGELOG.md

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

33
## Unreleased
44

5+
### Features
6+
7+
- Exception.HResult is now included in the mechanism data for all exceptions ([#4029](https://github.com/getsentry/sentry-dotnet/pull/4029))
8+
59
### Fixes
610

711
- Fixed symbolication and source context for net9.0-android ([#4033](https://github.com/getsentry/sentry-dotnet/pull/4033))
12+
- Target `net9.0` on Sentry.Google.Cloud.Functions to avoid conflict with Sentry.AspNetCore ([#4039](https://github.com/getsentry/sentry-dotnet/pull/4039))
813

914
### Dependencies
1015

@@ -21,6 +26,7 @@
2126
### Fixes
2227

2328
- Unknown stack frames in profiles on .NET 8+ ([#3967](https://github.com/getsentry/sentry-dotnet/pull/3967))
29+
- Missing MAUI `Shell` navigation breadcrumbs on iOS ([#4006](https://github.com/getsentry/sentry-dotnet/pull/4006))
2430

2531
## 5.3.0
2632

src/Sentry.Google.Cloud.Functions/Sentry.Google.Cloud.Functions.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
55
<PackageTags>$(PackageTags);GCP;Google Cloud Functions</PackageTags>
66
<Description>Official Google Cloud Functions integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
77
</PropertyGroup>
@@ -14,7 +14,13 @@
1414
<ItemGroup>
1515
<ProjectReference Include="..\Sentry.AspNetCore\Sentry.AspNetCore.csproj" />
1616
<PackageReference Include="Google.Cloud.Functions.Hosting" Version="2.0.0" />
17+
</ItemGroup>
18+
19+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
1720
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
1821
</ItemGroup>
22+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
23+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
24+
</ItemGroup>
1925

2026
</Project>

src/Sentry.Maui/Internal/MauiEventsBinder.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,16 @@ public void HandleApplicationEvents(Application application, bool bind = true)
3434
{
3535
if (bind)
3636
{
37-
// Attach element events to all descendents as they are added to the application.
37+
// Attach element events to all existing descendants (skip the application itself)
38+
foreach (var descendant in application.GetVisualTreeDescendants().Skip(1))
39+
{
40+
if (descendant is VisualElement element)
41+
{
42+
OnApplicationOnDescendantAdded(application, new ElementEventArgs(element));
43+
}
44+
}
45+
46+
// Attach element events to all descendants as they are added to the application.
3847
application.DescendantAdded += OnApplicationOnDescendantAdded;
3948
application.DescendantRemoved += OnApplicationOnDescendantRemoved;
4049

src/Sentry/Internal/MainExceptionProcessor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ private static Mechanism GetMechanism(Exception exception, int id, int? parentId
199199
exception.Data.Remove(Mechanism.DescriptionKey);
200200
}
201201

202+
// Add HResult to mechanism data before adding exception data, so that it can be overridden.
203+
mechanism.Data["HResult"] = $"0x{exception.HResult:X8}";
204+
202205
// Copy remaining exception data to mechanism data.
203206
foreach (var key in exception.Data.Keys.OfType<string>())
204207
{

test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsEfAsync.DotNet8_0.verified.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
SentryExceptions: [
1111
{
1212
Type: System.Exception,
13-
Value: my exception
13+
Value: my exception,
14+
Mechanism: {
15+
Type: generic,
16+
Synthetic: false,
17+
IsExceptionGroup: false,
18+
Data: {
19+
HResult: 0x80131500
20+
}
21+
}
1422
}
1523
],
1624
Level: error,

test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsEfAsync.DotNet9_0.verified.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
SentryExceptions: [
1111
{
1212
Type: System.Exception,
13-
Value: my exception
13+
Value: my exception,
14+
Mechanism: {
15+
Type: generic,
16+
Synthetic: false,
17+
IsExceptionGroup: false,
18+
Data: {
19+
HResult: 0x80131500
20+
}
21+
}
1422
}
1523
],
1624
Level: error,

test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsEfAsync.Net4_8.verified.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
SentryExceptions: [
1111
{
1212
Type: System.Exception,
13-
Value: my exception
13+
Value: my exception,
14+
Mechanism: {
15+
Type: generic,
16+
Synthetic: false,
17+
IsExceptionGroup: false,
18+
Data: {
19+
HResult: 0x80131500
20+
}
21+
}
1422
}
1523
],
1624
Level: error,

test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsSqlAsync.verified.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
SentryExceptions: [
1111
{
1212
Type: System.Exception,
13-
Value: my exception
13+
Value: my exception,
14+
Mechanism: {
15+
Type: generic,
16+
Synthetic: false,
17+
IsExceptionGroup: false,
18+
Data: {
19+
HResult: 0x80131500
20+
}
21+
}
1422
}
1523
],
1624
Level: error,

test/Sentry.EntityFramework.Tests/IntegrationTests.Simple.verified.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
SentryExceptions: [
1111
{
1212
Type: System.Exception,
13-
Value: my exception
13+
Value: my exception,
14+
Mechanism: {
15+
Type: generic,
16+
Synthetic: false,
17+
IsExceptionGroup: false,
18+
Data: {
19+
HResult: 0x80131500
20+
}
21+
}
1422
}
1523
],
1624
Level: error,

test/Sentry.EntityFramework.Tests/IntegrationTests.verify.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Sentry.EntityFramework.Tests;
55
public class IntegrationTests
66
{
77
// needs to be a variable to stop EF from inlining it as a constant
8-
static string shouldNotAppearInPayload = "SHOULD NOT APPEAR IN PAYLOAD";
8+
private static string shouldNotAppearInPayload = "SHOULD NOT APPEAR IN PAYLOAD";
99

1010
[SkippableFact]
1111
public async Task Simple()

0 commit comments

Comments
 (0)