sentry-dotnet
sentry-dotnet copied to clipboard
Allow regular expressions in the InAppIncludes and InAppExcludes
Problem Statement
One of our customers wants to be able to simply add their own namespace as an include and exclude everything else (see Discord thread).
Currently this doesn't work as the logic to determine whether a frame is InApp or not is: https://github.com/getsentry/sentry-dotnet/blob/5fab09efd4204fd07d95c818df79f7aa71d61e88/src/Sentry/SentryStackFrame.cs#L218
So if you don't have any excludes configured (or the namespace doesn't match some prefix configured as an exclude) the frame is determined as InApp.
Solution Brainstorm
If SentryOptions.InAppInclude
and SentryOptions.InAppExclude
were lists of SubstringOrRegex
rather than just lists of prefixes, it would be possible to configure an Exclude of .*
... which would enable the customer to do what they want.