From a9a92ed16e580ea452254f6f100b3085a5885dc9 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): Document traceSampling removal Explain how to migrate trace propagation configuration after the deprecated traceSampling option is removed in Java SDK v9. Refs getsentry/sentry-java#6415 Co-Authored-By: OpenAI --- docs/platforms/android/migration/v8-to-v9.mdx | 8 ++++++++ docs/platforms/java/common/migration/8.x-to-9.0.mdx | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/platforms/android/migration/v8-to-v9.mdx b/docs/platforms/android/migration/v8-to-v9.mdx index f7e9850e1cd15..f8d94e2faed15 100644 --- a/docs/platforms/android/migration/v8-to-v9.mdx +++ b/docs/platforms/android/migration/v8-to-v9.mdx @@ -31,6 +31,14 @@ 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. +## Removed `traceSampling` Option + +Version 9 removes `SentryOptions.setTraceSampling(...)`, `SentryOptions.isTraceSampling()`, and the `io.sentry.traces.trace-sampling` manifest option. This option was a global switch for trace propagation, not a transaction sampling setting. + +To stop attaching `sentry-trace` and `baggage` headers to outgoing HTTP requests, set `tracePropagationTargets` to an empty list. For Apollo v2, set `attachTracingHeaders` to `false` on `SentryApolloInterceptor` because the interceptor doesn't have a request URL to match against propagation targets. + +There is no replacement for suppressing the trace context in Sentry envelopes. Transactions with baggage now always include that context. + ## 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..3cf2e3e4d822c 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 @@ -49,6 +49,14 @@ The Scopes model introduced in version 8 is the supported context model in versi For backend and other JVM applications, APIs such as `Sentry.configureScope()` and `Sentry.setTag()` use the isolation scope by default. +## Removed `traceSampling` Option + +Version 9 removes `SentryOptions.setTraceSampling(...)` and `SentryOptions.isTraceSampling()`. The option was a global switch for trace propagation, not a transaction sampling setting. + +To stop attaching `sentry-trace` and `baggage` headers to outgoing HTTP requests, set `tracePropagationTargets` to an empty list. For Apollo v2, set `attachTracingHeaders` to `false` on `SentryApolloInterceptor` because the interceptor doesn't have a request URL to match against propagation targets. + +There is no replacement for suppressing the trace context in Sentry envelopes. Transactions with baggage now always include that context. + ## Removed OpenTelemetry APIs Version 9 removes these deprecated OpenTelemetry integration classes: From 174a89effe6a4fc917838af55a85b66774c1b6e7 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Thu, 12 Nov 2026 14:05:02 +0100 Subject: [PATCH 2/2] docs(android): Add manifest trace propagation migration Show manifest-only applications how to preserve disabled trace header propagation after removing the traceSampling option. Co-Authored-By: Claude --- docs/platforms/android/migration/v8-to-v9.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/platforms/android/migration/v8-to-v9.mdx b/docs/platforms/android/migration/v8-to-v9.mdx index f8d94e2faed15..7534c8880ab2c 100644 --- a/docs/platforms/android/migration/v8-to-v9.mdx +++ b/docs/platforms/android/migration/v8-to-v9.mdx @@ -35,7 +35,15 @@ On Android, APIs such as `Sentry.configureScope()` and `Sentry.setTag()` use the Version 9 removes `SentryOptions.setTraceSampling(...)`, `SentryOptions.isTraceSampling()`, and the `io.sentry.traces.trace-sampling` manifest option. This option was a global switch for trace propagation, not a transaction sampling setting. -To stop attaching `sentry-trace` and `baggage` headers to outgoing HTTP requests, set `tracePropagationTargets` to an empty list. For Apollo v2, set `attachTracingHeaders` to `false` on `SentryApolloInterceptor` because the interceptor doesn't have a request URL to match against propagation targets. +To stop attaching `sentry-trace` and `baggage` headers to outgoing HTTP requests, set `tracePropagationTargets` to an empty list. If your app uses manifest-only auto-initialization, replace the removed manifest option with an empty propagation target value: + +```xml {filename:AndroidManifest.xml} + +``` + +For Apollo v2, set `attachTracingHeaders` to `false` on `SentryApolloInterceptor` because the interceptor doesn't have a request URL to match against propagation targets. There is no replacement for suppressing the trace context in Sentry envelopes. Transactions with baggage now always include that context.