Skip to content

fix: libmonosgen and libxamarin frames currently showing as inapp#4960

Merged
jamescrosswell merged 7 commits intomainfrom
not-in-app-4194
Mar 10, 2026
Merged

fix: libmonosgen and libxamarin frames currently showing as inapp#4960
jamescrosswell merged 7 commits intomainfrom
not-in-app-4194

Conversation

@jamescrosswell
Copy link
Collaborator

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Features ✨

  • feat: Network calls for Session Replay on Android by jamescrosswell in #4860

Fixes 🐛

  • fix: libmonosgen and libxamarin frames currently showing as inapp by jamescrosswell in #4960
  • fix: Log Warning instead of Error when ratelimited by bitsandfoxes in #4927

Dependencies ⬆️

Deps

  • chore(deps): update Java SDK to v8.34.1 by github-actions in #4986
  • chore(deps): update CLI to v3.3.0 by github-actions in #4973
  • chore(deps): update Native SDK to v0.13.1 by github-actions in #4964
  • chore(deps): update Cocoa SDK to v9.5.0 by github-actions in #4944
  • chore(deps): update Native SDK to v0.13.0 by github-actions in #4941
  • chore(deps): update CLI to v3.2.2 by github-actions in #4943
  • chore(deps): update Java SDK to v8.33.0 by github-actions in #4933
  • chore(deps): update CLI to v3.2.0 by github-actions in #4805
    • NOTE: Sentry CLI v3 removed support for the legacy API key authentication method. Sentry CLI now only supports authenticating with Auth Tokens. If you are using API key authentication via SentryApiKey, you need to generate an Auth Token and use SentryAuthToken, instead.
  • chore(deps): update Cocoa SDK to v9.4.1 by github-actions in #4928
  • chore(deps): update Native SDK to v0.12.8 by github-actions in #4929
  • Apps built using the Sentry SDK for .NET must now target iOS version 15 or higher. Previously only version 13 or higher was required. (#4781) by github-actions in #4781
  • Bump Cocoa SDK from v8.57.3 to v9.2.0 (#4781) by github-actions in #4781
  • chore(deps): update Native SDK to v0.12.7 by github-actions in #4920

Other

  • chore: Set up dotagents with agent skills by Flash0ver in #4988
  • ref: align internal analyzer project with public compiler extensions by Flash0ver in #4842
  • style: file nesting by Flash0ver in #4894
  • ci: move from dotnet-format tool to .NET SDK command by Flash0ver in #4918
  • test(blazor): Add Playwright E2E tests for navigation breadcrumbs by bruno-garcia in #4908
  • test(android): Use volatile to produce SIGSEGV in native crash test by jpnurmi in #4919

🤖 This preview updates automatically when you update the PR.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.87%. Comparing base (1753b23) to head (45d5543).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4960      +/-   ##
==========================================
- Coverage   73.87%   73.87%   -0.01%     
==========================================
  Files         496      497       +1     
  Lines       17951    17957       +6     
  Branches     3516     3516              
==========================================
+ Hits        13262    13265       +3     
- Misses       3831     3833       +2     
- Partials      858      859       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell marked this pull request as ready for review March 2, 2026 09:50
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Assert.Equal arguments are swapped in tests
    • Swapped the two Assert.Equal calls to pass expectedInApp first and sut.InApp second so failure output labels are correct.

Create PR

Or push these changes by commenting:

@cursor push ba9940a433
Preview (ba9940a433)
diff --git a/test/Sentry.Tests/Protocol/Exceptions/SentryStackFrameTests.cs b/test/Sentry.Tests/Protocol/Exceptions/SentryStackFrameTests.cs
--- a/test/Sentry.Tests/Protocol/Exceptions/SentryStackFrameTests.cs
+++ b/test/Sentry.Tests/Protocol/Exceptions/SentryStackFrameTests.cs
@@ -256,7 +256,7 @@
         sut.ConfigureAppFrame(options);
 
         // Assert
-        Assert.Equal(sut.InApp, expectedInApp);
+        Assert.Equal(expectedInApp, sut.InApp);
     }
 
     [Theory]
@@ -276,7 +276,7 @@
         sut.ConfigureAppFrame(options);
 
         // Assert
-        Assert.Equal(sut.InApp, expectedInApp);
+        Assert.Equal(expectedInApp, sut.InApp);
     }
 
     [Fact]
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment on lines +15 to +20
#if NET9_0_OR_GREATER
[GeneratedRegex(LibMonoSgenPattern)]
internal static partial Regex LibMonoSgen { get; }

[GeneratedRegex(LibXamarinPattern)]
internal static partial Regex LibXamarin { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: use RegexOptions.ExplicitCapture and/or RegexOptions.CultureInvariant

re RegexOptions.ExplicitCapture

When the Regex-Pattern includes parentheses (( and )), these are also "Capture Groups" per default. But not sure if we actually consume these automatically captures Groups ... where we may do some work that is not necessarily needed ... in other words: impacting performance slightly.

We have three IStringOrRegexMatcher

  • DelimitedPrefixOrPatternMatcher
    • calls Regex.Matches
  • PrefixOrPatternMatcher
    • calls Regex.IsMatch
  • SubstringOrPatternMatcher
    • calls Regex.IsMatch

On the other hand ... although we are not actively using Capture Groups right now ... we might in the future and then the In-App detection might not work as expected.

I believe I'm actually talking myself out of this change now ... considering it's only about performance, not correctness.

re RegexOptions.CultureInvariant

Not sure if adding this option would actually be about correctness in our case ... perhaps also only performance.


I guess keeping the Regex-Options as they are (i.e. RegexOptions.Compiled for non-source-generated Regex) seems to be fine.

What do you think?

Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
@jamescrosswell jamescrosswell merged commit ec307a7 into main Mar 10, 2026
40 checks passed
@jamescrosswell jamescrosswell deleted the not-in-app-4194 branch March 10, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark mono/xamarin/dotnet system symbols as not inApp (iOS)

2 participants