Skip to content

feat(tracing): Ignore incoming server HTTP statuses - #6556

Open
adinauer wants to merge 30 commits into
9.x.xfrom
feat/ignore404-collection
Open

adinauer wants to merge 30 commits into
9.x.xfrom
feat/ignore404-collection

Conversation

@adinauer

@adinauer adinauer commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Ignore HTTP Status)


📜 Description

Collection branch for the incoming server HTTP status filtering stack targeting 9.x.x.

This branch intentionally contains only an empty collection commit. The implementation is split into four reviewable PRs covering server metadata, configuration, opt-in filtering, and the default 404 exclusion.

💡 Motivation and Context

The collection branch allows each stack PR to be merge-committed in order while the completed feature is eventually squash-merged into 9.x.x as one change.

Refs #4735
Refs #4736

💚 How did you test it?

No runtime changes are included in this collection branch.

📝 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

Merge the four implementation PRs into this collection branch from bottom to top, then squash-merge this PR into 9.x.x.

#skip-changelog

…umentation

Classify incoming Spring and OpenTelemetry server spans with sentry.kind and record numeric HTTP response statuses for later filtering.

Refs #4735
Refs #4736
Refs #6555
@github-actions

github-actions Bot commented Nov 11, 2026 •

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 2b572d4

@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

adinauer and others added 12 commits November 12, 2026 15:28
Avoid recording a provisional response status before the container handles
   an escaping exception. Preserve transaction finishing and error status,
   and verify omission across all three servlet integrations.

Refs #6557

Co-Authored-By: Claude <[email protected]>
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
Drop completed incoming server HTTP transactions when their root response status matches a configured range. Preserve lifecycle finalization while skipping processors, callbacks, envelope creation, and replay registration for filtered transactions.

Record transaction, span, and profile losses, clean up temporary profile traces, and cover Spring Boot servlet and WebFlux integrations.

Fixes #4735
Reference PR #6566 from the user-facing feature entry now that the stacked pull request has been created.
Stop sending incoming server transactions that finish with HTTP 404 unless users replace or clear the ignored status configuration. Document the opt-out and cover native Spring and OpenTelemetry paths across supported Spring Boot generations.

Fixes #4736
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 <[email protected]>
# Conflicts:
#	sentry-spring-boot-4/src/test/kotlin/io/sentry/spring/boot4/SentryAutoConfigurationTest.kt
#	sentry-spring-boot-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentryAutoConfigurationTest.kt
#	sentry-spring-boot/src/test/kotlin/io/sentry/spring/boot/SentryAutoConfigurationTest.kt
Default traceIgnoreStatusCodes to 301-303, 305-399, and 401-404 instead of only 404. Update documentation and boundary coverage so excluded gaps remain captured.

Refs #4736

Co-Authored-By: Claude <[email protected]>
@romtsn
romtsn marked this pull request as ready for review November 17, 2026 10:42
@romtsn
romtsn marked this pull request as draft November 17, 2026 10:43
@romtsn
romtsn self-requested a review November 17, 2026 10:43
adinauer and others added 6 commits November 19, 2026 10:48
Store traceIgnoreStatusCodes in a copy-on-write list so callers can mutate the exposed configuration while transactions iterate it. Mark the replaceable reference volatile so setter updates are visible across threads.

Refs #4736

Co-Authored-By: Claude <[email protected]>
Expose the values supported by the sentry.kind convention and use the server constant across Spring and OpenTelemetry instrumentation. This keeps convention keys and values separate while avoiding duplicated literals.

Refs #4735

Co-Authored-By: Claude <[email protected]>
Use the shared server span-kind value when identifying server transactions for HTTP status filtering.

Refs #4735

Co-Authored-By: Claude <[email protected]>
# Conflicts:
#	sentry/src/test/java/io/sentry/SentryClientTest.kt
adinauer and others added 8 commits November 19, 2026 11:15
Extract the duplicated client-report accounting used when transactions are filtered by name or HTTP status.

Refs #4735

Co-Authored-By: Claude <[email protected]>
Handle the supported integer status types through Number after validating the runtime type, preserving fail-open behavior for other numeric values.

Refs #4735

Co-Authored-By: Claude <[email protected]>
…umentation (#6557)

* feat(tracing): [Ignore HTTP Status 1] Add sentry.kind to server instrumentation

Classify incoming Spring and OpenTelemetry server spans with sentry.kind and record numeric HTTP response statuses for later filtering.

Refs #4735
Refs #4736
Refs #6555

* fix(spring): Omit unreliable HTTP status on escaping exceptions

Avoid recording a provisional response status before the container handles
   an escaping exception. Preserve transaction finishing and error status,
   and verify omission across all three servlet integrations.

Refs #6557

Co-Authored-By: Claude <[email protected]>

* feat(core): Add Sentry span kind constants

Expose the values supported by the sentry.kind convention and use the server constant across Spring and OpenTelemetry instrumentation. This keeps convention keys and values separate while avoiding duplicated literals.

Refs #4735

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…ration (#6559)

* feat(core): [Ignore HTTP Status 2] Add tracing status configuration

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

* fix(spring): Bind integer HTTP status codes from YAML

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 <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
… statuses (#6566)

* feat(tracing): Filter configured incoming HTTP statuses

Drop completed incoming server HTTP transactions when their root response status matches a configured range. Preserve lifecycle finalization while skipping processors, callbacks, envelope creation, and replay registration for filtered transactions.

Record transaction, span, and profile losses, clean up temporary profile traces, and cover Spring Boot servlet and WebFlux integrations.

Fixes #4735

* chore: Link HTTP status filter changelog entry

Reference PR #6566 from the user-facing feature entry now that the stacked pull request has been created.

* Format code

* ref(tracing): Use span kind constant for filtering

Use the shared server span-kind value when identifying server transactions for HTTP status filtering.

Refs #4735

Co-Authored-By: Claude <[email protected]>

* ref(core): Share ignored transaction accounting

Extract the duplicated client-report accounting used when transactions are filtered by name or HTTP status.

Refs #4735

Co-Authored-By: Claude <[email protected]>

* ref(core): Simplify HTTP status conversion

Handle the supported integer status types through Number after validating the runtime type, preserving fail-open behavior for other numeric values.

Refs #4735

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Sentry Github Bot <[email protected]>
Co-authored-by: Claude <[email protected]>
* feat(tracing): [Ignore HTTP Status 4] Ignore incoming 404s by default

Stop sending incoming server transactions that finish with HTTP 404 unless users replace or clear the ignored status configuration. Document the opt-out and cover native Spring and OpenTelemetry paths across supported Spring Boot generations.

Fixes #4736

* changelog

* feat(tracing): Align ignored status defaults with spec

Default traceIgnoreStatusCodes to 301-303, 305-399, and 401-404 instead of only 404. Update documentation and boundary coverage so excluded gaps remain captured.

Refs #4736

Co-Authored-By: Claude <[email protected]>

* fix(core): Make trace ignore statuses thread-safe

Store traceIgnoreStatusCodes in a copy-on-write list so callers can mutate the exposed configuration while transactions iterate it. Mark the replaceable reference volatile so setter updates are visible across threads.

Refs #4736

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
@adinauer
adinauer marked this pull request as ready for review November 19, 2026 12:42
@adinauer
adinauer requested a review from a team as a code owner November 19, 2026 12:42
@adinauer
adinauer requested review from runningcode and removed request for a team November 19, 2026 12:42

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.

4 participants