Skip to content

Commit

Permalink
Add support for "ignoredErrors" functionality in Sentry SDK (#286)
Browse files Browse the repository at this point in the history
* Bump io.sentry:sentry-jul from 7.8.0 to 8.2.0

Bumps [io.sentry:sentry-jul](https://github.com/getsentry/sentry-java) from 7.8.0 to 8.2.0.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@7.8.0...8.2.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-jul
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add support for "ignoredErrors" functionality in Sentry SDK

* Remove empty line after comment

* Move line of code to be part of group of similar operations

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dalbani and dependabot[bot] authored Feb 20, 2025
1 parent ddb1a84 commit 9471f56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@
</modules>
</profile>
</profiles>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ public interface SentryConfig {
*/
Optional<List<String>> ignoredExceptionsForType();

/**
*
* You can use this option to filter out errors whose message matches a certain pattern before sending to Sentry.
*
*/
Optional<List<String>> ignoredErrors();

/**
* Environment
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static SentryOptions toSentryOptions(SentryConfig sentryConfig) {
options.setDsn(sentryConfig.dsn().get());
sentryConfig.environment().ifPresent(options::setEnvironment);
sentryConfig.release().ifPresent(options::setRelease);
sentryConfig.ignoredErrors().ifPresent(options::setIgnoredErrors);
sentryConfig.serverName().ifPresent(options::setServerName);
sentryConfig.tracesSampleRate().ifPresent(options::setTracesSampleRate);
sentryConfig.contextTags().ifPresent(contextTags -> contextTags.forEach(options::addContextTag));
Expand Down

0 comments on commit 9471f56

Please sign in to comment.