Repository navigation
Conversation
Add an unset option for ignored incoming server HTTP status codes and ranges. Parse external configuration without clearing existing values when all entries are invalid, and support Spring Boot binding across all supported versions. This PR only adds configuration surfaces; filtering remains unchanged. Refs #4735
Contributor
|
📲 Install BuildsAndroid
|
This was referenced Nov 11, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Ignore HTTP Status)
📜 Description
Add the nullable
ignoredServerHttpStatusCodesForTracingoption without changing tracing behavior or configuring any default ignored status codes.The option accepts
HttpStatusCodeRangevalues through Java. External configuration accepts comma-separated status codes and inclusive ranges such as404,410,500-599throughsentry.properties, JVM system properties, and environment variables. Missing values preserve existing programmatic configuration, while an explicit empty value clears the list.Spring Boot configuration binding is covered across all three supported Spring Boot modules. A shared
HttpStatusCodeRange.valueOf(String)parser keeps Spring and external parsing consistent and validates HTTP status codes within 100-599.💡 Motivation and Context
This is the configuration layer for #4735. It intentionally does not consume the option yet, so incoming HTTP transactions continue to be traced exactly as before. The next PR adds opt-in filtering for configured status codes.
Malformed external entries are logged and ignored without aborting SDK initialization. Mixed valid and invalid values retain the valid ranges, and an all-invalid non-empty value does not clear existing configuration. Spring Boot retains its normal fail-fast configuration binding behavior for invalid values.
Refs #4735
💚 How did you test it?
HttpStatusCodeRangeTest,ExternalOptionsTest, andSentryOptionsTestSentryAutoConfigurationTestinsentry-spring-boot,sentry-spring-boot-jakarta, andsentry-spring-boot-4:sentry:checkKotlinAbi📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The next PR filters configured incoming server HTTP statuses in
SentryClientwhile preserving the current default behavior.#skip-changelog