Repository navigation
Conversation
|
📲 Install BuildsAndroid
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 74bc19a. Configure here.
runningcode
left a comment
There was a problem hiding this comment.
Only comment here is about exposing the getter exposing an internal mutable list. Is that safe?
| * | ||
| * @return the configured HTTP status code ranges, or {@code null} if unset | ||
| */ | ||
| public @Nullable List<HttpStatusCodeRange> getIgnoredServerHttpStatusCodesForTracing() { |
There was a problem hiding this comment.
nit: my agent noticed that this differs from the spec traceIgnoreStatusCodes any thoughts on that?
There was a problem hiding this comment.
i'll align since with JS removing the option, Java would be the only one with a different name now, not sure how i missed this when i first checked - thx for flagging
We have mixed getters. IIRC it's mostly the ones that transform, e.g. from |
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
Support unquoted numeric entries in Spring Boot YAML lists while preserving status code validation across Boot 2, 3, and 4. Refs #4735 Co-Authored-By: Claude <noreply@anthropic.com>
b0164e1 to
7b048a0
Compare

PR Stack (Ignore HTTP Status)
📜 Description
Add the nullable
traceIgnoreStatusCodesoption 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