Skip to content

Commit 0945f03

Browse files
Merge branch 'main' into bruno-garcia-patch-2
2 parents f492215 + ac4f837 commit 0945f03

24 files changed

+183
-46
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- name: Get auth token
2222
id: token
23-
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
23+
uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
2424
with:
2525
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2626
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Target `net9.0` on Sentry.Google.Cloud.Functions to avoid conflict with Sentry.AspNetCore ([#4039](https://github.com/getsentry/sentry-dotnet/pull/4039))
88

9+
### Features
10+
11+
- Exception.HResult is now included in the mechanism data for all exceptions ([#4029](https://github.com/getsentry/sentry-dotnet/pull/4029))
12+
913
### Dependencies
1014

1115
- Bump CLI from v2.42.2 to v2.42.3 ([#4036](https://github.com/getsentry/sentry-dotnet/pull/4036))
@@ -21,6 +25,7 @@
2125
### Fixes
2226

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

2530
## 5.3.0
2631

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)