From ffe31f750d129751c2b0738806963c7b0349647c Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Thu, 12 Nov 2026 11:14:36 +0100 Subject: [PATCH 1/2] docs(java): Add OPTIONS tracing migration guidance Explain how Java and Android applications can preserve OPTIONS request tracing after the v9 default changes. Refs getsentry/sentry-java#6254 Co-Authored-By: OpenAI --- docs/platforms/android/migration/v8-to-v9.mdx | 10 ++++++++++ docs/platforms/java/common/migration/8.x-to-9.0.mdx | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/platforms/android/migration/v8-to-v9.mdx b/docs/platforms/android/migration/v8-to-v9.mdx index f7e9850e1cd15..769a9ddac0ee6 100644 --- a/docs/platforms/android/migration/v8-to-v9.mdx +++ b/docs/platforms/android/migration/v8-to-v9.mdx @@ -31,6 +31,16 @@ The Scopes model introduced in version 8 is the supported context model in versi On Android, APIs such as `Sentry.configureScope()` and `Sentry.setTag()` use the current scope by default. +## `OPTIONS` Requests Aren't Traced by Default + +Version 9 no longer creates transactions for HTTP `OPTIONS` requests by default. If your application relies on these transactions, preserve the version 8 behavior during manual initialization: + +```kotlin +SentryAndroid.init(this) { options -> + options.isTraceOptionsRequests = true +} +``` + ## Manual Logs and Metrics Calls to `Sentry.logger()` and `Sentry.metrics()` no longer require a global enable option. Remove calls to: diff --git a/docs/platforms/java/common/migration/8.x-to-9.0.mdx b/docs/platforms/java/common/migration/8.x-to-9.0.mdx index 932e2977a42c8..9ab9f0a4d479d 100644 --- a/docs/platforms/java/common/migration/8.x-to-9.0.mdx +++ b/docs/platforms/java/common/migration/8.x-to-9.0.mdx @@ -62,6 +62,14 @@ Version 9 removes these deprecated OpenTelemetry integration classes: See the OpenTelemetry documentation for supported setup options. +## `OPTIONS` Requests Aren't Traced by Default + +Version 9 no longer creates transactions for HTTP `OPTIONS` requests by default. If your application relies on these transactions, preserve the version 8 behavior during initialization: + +```java +Sentry.init(options -> options.setTraceOptionsRequests(true)); +``` + ## Manual Logs and Metrics Calls to `Sentry.logger()` and `Sentry.metrics()` no longer require a global enable option. Remove calls to: From 390d24dbfc6a0f570fcefd0e609fbc6fff6b2a9e Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Thu, 12 Nov 2026 14:51:41 +0100 Subject: [PATCH 2/2] docs(java): Scope OPTIONS migration to Spring Remove ineffective Android guidance and document the Spring Boot property for preserving inbound Spring OPTIONS transactions. Co-Authored-By: Claude --- docs/platforms/android/migration/v8-to-v9.mdx | 10 ---------- docs/platforms/java/common/migration/8.x-to-9.0.mdx | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/docs/platforms/android/migration/v8-to-v9.mdx b/docs/platforms/android/migration/v8-to-v9.mdx index 769a9ddac0ee6..f7e9850e1cd15 100644 --- a/docs/platforms/android/migration/v8-to-v9.mdx +++ b/docs/platforms/android/migration/v8-to-v9.mdx @@ -31,16 +31,6 @@ The Scopes model introduced in version 8 is the supported context model in versi On Android, APIs such as `Sentry.configureScope()` and `Sentry.setTag()` use the current scope by default. -## `OPTIONS` Requests Aren't Traced by Default - -Version 9 no longer creates transactions for HTTP `OPTIONS` requests by default. If your application relies on these transactions, preserve the version 8 behavior during manual initialization: - -```kotlin -SentryAndroid.init(this) { options -> - options.isTraceOptionsRequests = true -} -``` - ## Manual Logs and Metrics Calls to `Sentry.logger()` and `Sentry.metrics()` no longer require a global enable option. Remove calls to: diff --git a/docs/platforms/java/common/migration/8.x-to-9.0.mdx b/docs/platforms/java/common/migration/8.x-to-9.0.mdx index 9ab9f0a4d479d..6556eef8af510 100644 --- a/docs/platforms/java/common/migration/8.x-to-9.0.mdx +++ b/docs/platforms/java/common/migration/8.x-to-9.0.mdx @@ -62,12 +62,12 @@ Version 9 removes these deprecated OpenTelemetry integration classes: See the OpenTelemetry documentation for supported setup options. -## `OPTIONS` Requests Aren't Traced by Default +## Spring `OPTIONS` Requests Aren't Traced by Default -Version 9 no longer creates transactions for HTTP `OPTIONS` requests by default. If your application relies on these transactions, preserve the version 8 behavior during initialization: +Version 9 no longer creates automatically instrumented transactions for inbound HTTP `OPTIONS` requests in Spring MVC and Spring WebFlux by default. If your application relies on these transactions, preserve the version 8 behavior with the following Spring Boot property: -```java -Sentry.init(options -> options.setTraceOptionsRequests(true)); +```properties {filename:application.properties} +sentry.trace-options-requests=true ``` ## Manual Logs and Metrics