Skip to content

feat(core): [Ignore HTTP Status 2] Add ignoredServerHttpStatusCodesForTracing configuration - #6559

Draft
adinauer wants to merge 1 commit into
feat/ignore404-server-kindfrom
feat/ignore404-options
Draft

adinauer wants to merge 1 commit into
feat/ignore404-server-kindfrom
feat/ignore404-options

Conversation

@adinauer

@adinauer adinauer commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Ignore HTTP Status)


📜 Description

Add the nullable ignoredServerHttpStatusCodesForTracing option without changing tracing behavior or configuring any default ignored status codes.

The option accepts HttpStatusCodeRange values through Java. External configuration accepts comma-separated status codes and inclusive ranges such as 404,410,500-599 through sentry.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, and SentryOptionsTest
  • SentryAutoConfigurationTest in sentry-spring-boot, sentry-spring-boot-jakarta, and sentry-spring-boot-4
  • Spotless formatting and checks for affected modules
  • :sentry:checkKotlinAbi
  • Verified generated Spring configuration metadata in all three Spring Boot modules

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

The next PR filters configured incoming server HTTP statuses in SentryClient while preserving the current default behavior.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into 9.x.x.

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
@github-actions

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 3c0b86d

@sentry

sentry Bot commented Nov 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant