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

Add options.ignoredErrors accepting String and Regex #4083

Merged
merged 8 commits into from
Jan 24, 2025

Conversation

lcian
Copy link
Member

@lcian lcian commented Jan 21, 2025

📜 Description

Adds an option ignoredErrors (called ignoreErrors in other SDKs) to ignore Errors matching a certain String or Regex

💡 Motivation and Context

Closes #3471

💚 How did you test it?

Unit tests for Client, Options and ExternalOptions

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

Copy link
Contributor

github-actions bot commented Jan 21, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c088ec3

Copy link
Contributor

github-actions bot commented Jan 21, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 465.06 ms 512.53 ms 47.47 ms
Size 1.65 MiB 2.31 MiB 678.16 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
00c8eeb 415.32 ms 428.08 ms 12.76 ms

App size

Revision Plain With Sentry Diff
00c8eeb 1.70 MiB 2.36 MiB 671.98 KiB

Previous results on branch: feat/ignore-exceptions

Startup times

Revision Plain With Sentry Diff
27b404c 402.96 ms 465.55 ms 62.59 ms
8b85eaa 438.47 ms 462.70 ms 24.23 ms
8011314 398.27 ms 475.16 ms 76.88 ms
d7c436a 447.47 ms 513.85 ms 66.38 ms

App size

Revision Plain With Sentry Diff
27b404c 1.65 MiB 2.31 MiB 678.18 KiB
8b85eaa 1.65 MiB 2.31 MiB 677.69 KiB
8011314 1.65 MiB 2.31 MiB 677.69 KiB
d7c436a 1.65 MiB 2.31 MiB 677.88 KiB

@lcian lcian force-pushed the feat/ignore-exceptions branch from 226f075 to 82b9faf Compare January 22, 2025 13:10
@lcian lcian requested a review from adinauer January 23, 2025 16:13
Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

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

Mostly looks good already, we should agree on an order of evaluation for the filtering and keep it consistent across events being checked.

CHANGELOG.md Show resolved Hide resolved
sentry/src/main/java/io/sentry/util/ErrorUtils.java Outdated Show resolved Hide resolved
@lcian lcian changed the title Add options.ignoreExceptions accepting String and Regex Add options.ignoredErrors accepting String and Regex Jan 24, 2025
Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

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

Nice work 👏 LGTM!

@lcian lcian merged commit 5c403ff into main Jan 24, 2025
38 checks passed
@lcian lcian deleted the feat/ignore-exceptions branch January 24, 2025 11:49
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.

Add options.ignoreErrors accepting String and Regex
2 participants