Skip to content

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

Open
adinauer wants to merge 2 commits into
feat/ignore404-collectionfrom
feat/ignore404-server-kind
Open

adinauer wants to merge 2 commits into
feat/ignore404-collectionfrom
feat/ignore404-server-kind

Conversation

@adinauer

@adinauer adinauer commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Ignore HTTP Status)


📜 Description

Add the standard sentry.kind = "server" marker and numeric http.response.status_code data to incoming HTTP transactions created by all supported Spring servlet and WebFlux integrations.

Map OpenTelemetry SpanKind.SERVER roots and children to the same marker, and promote the HTTP response status onto reconstructed server root transaction data. Existing otel.kind output remains unchanged, and no filtering or configuration behavior is introduced in this PR.

💡 Motivation and Context

This metadata provides a stable, operation- and transaction-name-independent basis for the later incoming HTTP status filtering PRs in this stack. Restricting response-status promotion to server roots prevents outgoing HTTP transactions from being misclassified by the later filter.

The native server marker is preserved through the Sentry-to-OTel-to-Sentry bridge when the bridge represents a Sentry-created span with the default OTel INTERNAL kind.

SDK team review: approved with no findings.

Refs #4735
Refs #4736
Refs #6555

💚 How did you test it?

  • Focused exporter tests in sentry-opentelemetry-core
  • Servlet and WebFlux tracing filter tests in sentry-spring, sentry-spring-jakarta, and sentry-spring-7
  • Servlet and WebFlux Person*IntegrationTest suites in all three Spring Boot modules
  • :sentry:checkKotlinAbi
  • Spotless formatting for all affected 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

PR 2 adds the unset ignoredServerHttpStatusCodesForTracing configuration surface. The next PR implements opt-in filtering without changing the default tracing behavior.

#skip-changelog

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

…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 54d0dca

@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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a32bc6e. Configure here.

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 <noreply@anthropic.com>

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