Integration
sentry
Java Version
21
Version
8.2.0
Steps to Reproduce
Create a SentryHandler like the following, in this case setting the list of ignored errors:
SentryOptions options = new SentryOptions();
options.setIgnoredErrors(List.of("error1", "error2"));
...
SentryHandler handler = new SentryHandler(options);
...
Register the handler and when an issue is handled by Sentry, realise that the list of ignored errors is actually empty.
This is due to the fact that:
- The
SentryHandler constructor always sets enableExternalConfiguration = true and thus triggers a configuration merge
PropertiesProvider::getList() returns an empty list if the property (e.g. ignored-errors in this case) is missing
SentryOptions::setIgnoredErrors() called by the merge() function replaces the list containing [error1, error2] from the internal options with an empty list [] created previously
Could you provide a way to instantiate a SentryHandler which doesn't enable external configuration?
Expected Result
The list of ignored errors is [error1, error2].
Actual Result
The list of ignored errors is [] (empty list).
Integration
sentry
Java Version
21
Version
8.2.0
Steps to Reproduce
Create a
SentryHandlerlike the following, in this case setting the list of ignored errors:Register the handler and when an issue is handled by Sentry, realise that the list of ignored errors is actually empty.
This is due to the fact that:
SentryHandlerconstructor always setsenableExternalConfiguration = trueand thus triggers a configuration mergePropertiesProvider::getList()returns an empty list if the property (e.g.ignored-errorsin this case) is missingSentryOptions::setIgnoredErrors()called by themerge()function replaces the list containing[error1, error2]from the internal options with an empty list[]created previouslyCould you provide a way to instantiate a
SentryHandlerwhich doesn't enable external configuration?Expected Result
The list of ignored errors is
[error1, error2].Actual Result
The list of ignored errors is
[](empty list).