Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular expressions can now be used for InApp includes/excludes #3321

Merged
merged 19 commits into from
May 6, 2024

Conversation

jamescrosswell
Copy link
Collaborator

Resolves #3158

bitsandfoxes
bitsandfoxes previously approved these changes Apr 24, 2024
Copy link
Contributor

@bitsandfoxes bitsandfoxes left a comment

Choose a reason for hiding this comment

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

That is a really nice QOL improvement.

@bitsandfoxes bitsandfoxes dismissed their stale review April 24, 2024 09:49

Test don't look happy.

src/Sentry/SentryStackFrame.cs Outdated Show resolved Hide resolved
@vaind vaind mentioned this pull request Apr 26, 2024
src/Sentry/PrefixOrRegexPattern.cs Outdated Show resolved Hide resolved
src/Sentry.Profiling/SampleProfileBuilder.cs Outdated Show resolved Hide resolved
src/Sentry/SentryOptions.cs Outdated Show resolved Hide resolved
src/Sentry/SentryStackFrame.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@vaind vaind left a comment

Choose a reason for hiding this comment

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

It's a bit more complicated solution than what I had in mind in my proposal (albeit more flexible too, I guess), but as long as the performance is OK, I'm fine with that. Have you checked the original vs current version in benchmarks manually? Can you please post the results?

@jamescrosswell
Copy link
Collaborator Author

jamescrosswell commented May 6, 2024

Have you checked the original vs current version in benchmarks manually? Can you please post the results?

@vaind the newer code was actually significantly slower (~40%) so I've tightened it up a bit and now I'm seeing:

main branch

Method N Mean Error StdDev Allocated
ConfigureAppFrame 1000 110.5 us 2.16 us 3.02 us 133.77 KB

inapp-regex branch

Method N Mean Error StdDev Allocated
ConfigureAppFrame 1000 62.92 us 1.249 us 3.064 us 976 B

Which is cool... now it's way faster and allocates way less memory 🥳 I think most of those gains were simply getting rid of Linq, although I did get rid of another lambda as well.

Copy link
Collaborator

@vaind vaind left a comment

Choose a reason for hiding this comment

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

great effort & thanks for the benchmarks

@jamescrosswell jamescrosswell merged commit 34b5598 into main May 6, 2024
20 checks passed
@jamescrosswell jamescrosswell deleted the inapp-regex branch May 6, 2024 07:01
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.

Allow regular expressions in the InAppIncludes and InAppExcludes
4 participants