Skip to content

Commit 1f0e1e0

Browse files
runningcodeclaude
andauthored
ref(feedback): Remove deprecated user feedback APIs (#6337)
* ref(feedback): Remove deprecated user feedback APIs Remove UserFeedback, captureUserFeedback and fromUserFeedback from the core SDK, plus SentryUserFeedbackDialog and the SentryUserFeedbackButton view and composable on Android. All were deprecated in 8.x in favor of Sentry.feedback() and SentryUserFeedbackForm. SentryItemType.UserFeedback stays because hybrid SDKs and envelopes cached by older versions can still carry user_report items. Resolves JAVA-493 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog * ref(feedback): Remove deprecated Sentry.captureFeedback and showUserFeedbackDialog Both were thin wrappers around Sentry.feedback(), deprecated in 8.x. HubAdapter now calls Sentry.feedback().capture(...) directly, like ScopesAdapter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 28b9eaf commit 1f0e1e0

40 files changed

Lines changed: 54 additions & 1283 deletions

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## Unreleased
44

5+
### Breaking Changes
6+
7+
- Remove the deprecated user feedback APIs ([#6337](https://github.com/getsentry/sentry-java/pull/6337))
8+
- `UserFeedback` and `Sentry.captureUserFeedback(...)`: use `Sentry.feedback().capture(...)` with `io.sentry.protocol.Feedback` instead
9+
- `Sentry.captureFeedback(...)`: use `Sentry.feedback().capture(...)` instead
10+
- `Sentry.showUserFeedbackDialog(...)`: use `Sentry.feedback().show(...)` instead
11+
- Android: `SentryUserFeedbackDialog`: use `SentryUserFeedbackForm` instead
12+
- Android: the `SentryUserFeedbackButton` view and composable: call `Sentry.feedback().show()` from your own button instead
13+
514
### Fixes
615

716
- Report the number of dropped spans in client reports when a batched span envelope item is discarded, instead of a quantity of 1 (e.g. for Flutter span streaming) ([#6265](https://github.com/getsentry/sentry-java/pull/6265))

‎sentry-android-core/api/sentry-android-core.api‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -576,33 +576,6 @@ public abstract interface class io/sentry/android/core/SentryShakeDetector$Liste
576576
public abstract fun onShake ()V
577577
}
578578

579-
public class io/sentry/android/core/SentryUserFeedbackButton : android/widget/Button {
580-
public fun <init> (Landroid/content/Context;)V
581-
public fun <init> (Landroid/content/Context;Landroid/util/AttributeSet;)V
582-
public fun <init> (Landroid/content/Context;Landroid/util/AttributeSet;I)V
583-
public fun <init> (Landroid/content/Context;Landroid/util/AttributeSet;II)V
584-
public fun setOnClickListener (Landroid/view/View$OnClickListener;)V
585-
}
586-
587-
public final class io/sentry/android/core/SentryUserFeedbackDialog : io/sentry/android/core/SentryUserFeedbackForm {
588-
}
589-
590-
public class io/sentry/android/core/SentryUserFeedbackDialog$Builder : io/sentry/android/core/SentryUserFeedbackForm$Builder {
591-
public fun <init> (Landroid/content/Context;)V
592-
public fun <init> (Landroid/content/Context;I)V
593-
public fun <init> (Landroid/content/Context;ILio/sentry/android/core/SentryUserFeedbackDialog$OptionsConfiguration;)V
594-
public fun <init> (Landroid/content/Context;Lio/sentry/android/core/SentryUserFeedbackDialog$OptionsConfiguration;)V
595-
public fun associatedEventId (Lio/sentry/protocol/SentryId;)Lio/sentry/android/core/SentryUserFeedbackDialog$Builder;
596-
public synthetic fun associatedEventId (Lio/sentry/protocol/SentryId;)Lio/sentry/android/core/SentryUserFeedbackForm$Builder;
597-
public fun configurator (Lio/sentry/SentryFeedbackOptions$OptionsConfigurator;)Lio/sentry/android/core/SentryUserFeedbackDialog$Builder;
598-
public synthetic fun configurator (Lio/sentry/SentryFeedbackOptions$OptionsConfigurator;)Lio/sentry/android/core/SentryUserFeedbackForm$Builder;
599-
public fun create ()Lio/sentry/android/core/SentryUserFeedbackDialog;
600-
public synthetic fun create ()Lio/sentry/android/core/SentryUserFeedbackForm;
601-
}
602-
603-
public abstract interface class io/sentry/android/core/SentryUserFeedbackDialog$OptionsConfiguration : io/sentry/android/core/SentryUserFeedbackForm$OptionsConfiguration {
604-
}
605-
606579
public class io/sentry/android/core/SentryUserFeedbackForm : android/app/AlertDialog {
607580
protected fun onCreate (Landroid/os/Bundle;)V
608581
public fun onDetachedFromWindow ()V

‎sentry-android-core/src/main/java/io/sentry/android/core/SentryUserFeedbackButton.java‎

Lines changed: 0 additions & 133 deletions
This file was deleted.

‎sentry-android-core/src/main/java/io/sentry/android/core/SentryUserFeedbackDialog.java‎

Lines changed: 0 additions & 114 deletions
This file was deleted.

‎sentry-android-core/src/main/res/drawable/sentry_oval_button_ripple_background.xml‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎sentry-android-core/src/main/res/drawable/sentry_user_feedback_button_logo_24.xml‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎sentry-android-core/src/main/res/values/attrs.xml‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎sentry-android-core/src/test/java/io/sentry/android/core/SessionTrackingIntegrationTest.kt‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import io.sentry.SentryMetricsEvents
2323
import io.sentry.SentryReplayEvent
2424
import io.sentry.Session
2525
import io.sentry.TraceContext
26-
import io.sentry.UserFeedback
2726
import io.sentry.protocol.Feedback
2827
import io.sentry.protocol.SentryId
2928
import io.sentry.protocol.SentryTransaction
@@ -156,10 +155,6 @@ class SessionTrackingIntegrationTest {
156155
TODO("Not yet implemented")
157156
}
158157

159-
override fun captureUserFeedback(userFeedback: UserFeedback) {
160-
TODO("Not yet implemented")
161-
}
162-
163158
override fun captureSession(session: Session, hint: Hint?) {
164159
sessionUpdates.add(session)
165160
}

0 commit comments

Comments
 (0)