Title: Merging of undefined external option of type "list" overrides internal one actually defined · Issue #4205 · getsentry/sentry-java · GitHub
Open Graph Title: Merging of undefined external option of type "list" overrides internal one actually defined · Issue #4205 · getsentry/sentry-java
X Title: Merging of undefined external option of type "list" overrides internal one actually defined · Issue #4205 · getsentry/sentry-java
Description: 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...
Open Graph Description: 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 SentryOpt...
X Description: 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 SentryOpt...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/4205
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Merging of undefined external option of type \"list\" overrides internal one actually defined","articleBody":"### Integration\n\nsentry\n\n### Java Version\n\n21\n\n### Version\n\n8.2.0\n\n### Steps to Reproduce\n\nCreate a `SentryHandler` like the following, in this case setting the list of ignored errors:\n```java\nSentryOptions options = new SentryOptions();\noptions.setIgnoredErrors(List.of(\"error1\", \"error2\"));\n...\nSentryHandler handler = new SentryHandler(options);\n...\n```\n\nRegister the handler and when an issue is handled by Sentry, realise that the list of ignored errors is actually empty.\n\nThis is due to the fact that:\n1. The `SentryHandler` constructor always sets `enableExternalConfiguration = true` and thus triggers a configuration merge\n2. `PropertiesProvider::getList()` returns an empty list if the property (e.g. `ignored-errors` in this case) is missing\n3. `SentryOptions::setIgnoredErrors()` called by the `merge()` function replaces the list containing `[error1, error2]` from the internal options with an empty list `[]` created previously\n\nCould you provide a way to instantiate a `SentryHandler` which _doesn't_ enable external configuration?\n\n### Expected Result\n\nThe list of ignored errors is `[error1, error2]`.\n\n### Actual Result\n\nThe list of ignored errors is `[]` (empty list).","author":{"url":"https://github.com/dalbani","@type":"Person","name":"dalbani"},"datePublished":"2025-02-24T21:40:53Z","url":"https://github.com/getsentry/sentry-java/issues/4205"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:50745882-9e61-ef20-ec8c-36030b37df9e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3DE:AF327:3E0A49:551465:6B046D79 |
| html-safe-nonce | 65d216431b726c37af4dee92f5851cf3bdf5e5928ae9c349acf490f39e305357 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0RFOkFGMzI3OjNFMEE0OTo1NTE0NjU6NkIwNDZENzkiLCJ2aXNpdG9yX2lkIjoiODUwNjE0NDk1NzI4NjA4Mzk2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f223f445d506c4580be6bd350742e65c71a2618cb3e459af894af41807b1f13c |
| hovercard-subject-tag | issue:2876217981 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/4205/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9bbd6fed5d879a9b3ea441df0764d6381d9f6c546808995832b159c57f61b9fa/getsentry/sentry-java/issues/4205 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9bbd6fed5d879a9b3ea441df0764d6381d9f6c546808995832b159c57f61b9fa/getsentry/sentry-java/issues/4205 |
| og:image:alt | 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 SentryOpt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dalbani |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cfb5f24c6e01d85f70804652a5107e5cac03a161 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width