Skip to content

Commit 5dd1c34

Browse files
authored
Merge eadb567 into 2365d34
2 parents 2365d34 + eadb567 commit 5dd1c34

37 files changed

+1242
-61
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Features
66

7+
- Add new User Feedback API ([#4286](https://github.com/getsentry/sentry-java/pull/4286))
8+
- We now introduced Sentry.captureFeedback, which supersedes Sentry.captureUserFeedback
79
- Add `SentryWrapper.wrapRunnable` to wrap `Runnable` for use with Sentry ([#4332](https://github.com/getsentry/sentry-java/pull/4332))
810

911
### Fixes

sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
import io.sentry.ISpan;
99
import io.sentry.MeasurementUnit;
1010
import io.sentry.Sentry;
11-
import io.sentry.UserFeedback;
1211
import io.sentry.instrumentation.file.SentryFileOutputStream;
13-
import io.sentry.protocol.SentryId;
12+
import io.sentry.protocol.Feedback;
1413
import io.sentry.protocol.User;
1514
import io.sentry.samples.android.compose.ComposeActivity;
1615
import io.sentry.samples.android.databinding.ActivityMainBinding;
@@ -70,13 +69,12 @@ protected void onCreate(Bundle savedInstanceState) {
7069

7170
binding.sendUserFeedback.setOnClickListener(
7271
view -> {
73-
SentryId sentryId = Sentry.captureException(new Exception("I have feedback"));
72+
Feedback feedback =
73+
new Feedback("It broke on Android. I don't know why, but this happens.");
74+
feedback.setContactEmail("john@me.com");
75+
feedback.setName("John Me");
7476

75-
UserFeedback userFeedback = new UserFeedback(sentryId);
76-
userFeedback.setComments("It broke on Android. I don't know why, but this happens.");
77-
userFeedback.setEmail("john@me.com");
78-
userFeedback.setName("John Me");
79-
Sentry.captureUserFeedback(userFeedback);
77+
Sentry.captureFeedback(feedback);
8078
});
8179

8280
binding.addAttachment.setOnClickListener(

sentry/api/sentry.api

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public final class io/sentry/Baggage {
3838
public fun <init> (Ljava/util/concurrent/ConcurrentHashMap;Ljava/lang/Double;Ljava/lang/Double;Ljava/lang/String;ZZLio/sentry/ILogger;)V
3939
public fun forceSetSampleRate (Ljava/lang/Double;)V
4040
public fun freeze ()V
41-
public static fun fromEvent (Lio/sentry/SentryEvent;Lio/sentry/SentryOptions;)Lio/sentry/Baggage;
41+
public static fun fromEvent (Lio/sentry/SentryBaseEvent;Ljava/lang/String;Lio/sentry/SentryOptions;)Lio/sentry/Baggage;
4242
public static fun fromHeader (Ljava/lang/String;)Lio/sentry/Baggage;
4343
public static fun fromHeader (Ljava/lang/String;Lio/sentry/ILogger;)Lio/sentry/Baggage;
4444
public static fun fromHeader (Ljava/lang/String;ZLio/sentry/ILogger;)Lio/sentry/Baggage;
@@ -352,6 +352,7 @@ public final class io/sentry/DataCategory : java/lang/Enum {
352352
public static final field Attachment Lio/sentry/DataCategory;
353353
public static final field Default Lio/sentry/DataCategory;
354354
public static final field Error Lio/sentry/DataCategory;
355+
public static final field Feedback Lio/sentry/DataCategory;
355356
public static final field Monitor Lio/sentry/DataCategory;
356357
public static final field Profile Lio/sentry/DataCategory;
357358
public static final field ProfileChunk Lio/sentry/DataCategory;
@@ -602,6 +603,9 @@ public final class io/sentry/HubAdapter : io/sentry/IHub {
602603
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
603604
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
604605
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
606+
public fun captureFeedback (Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;
607+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
608+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
605609
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
606610
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
607611
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -670,6 +674,7 @@ public final class io/sentry/HubScopesWrapper : io/sentry/IHub {
670674
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
671675
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
672676
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
677+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
673678
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
674679
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
675680
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -903,6 +908,9 @@ public abstract interface class io/sentry/IScopes {
903908
public abstract fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
904909
public abstract fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
905910
public fun captureException (Ljava/lang/Throwable;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
911+
public fun captureFeedback (Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;
912+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
913+
public abstract fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
906914
public fun captureMessage (Ljava/lang/String;)Lio/sentry/protocol/SentryId;
907915
public fun captureMessage (Ljava/lang/String;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
908916
public abstract fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
@@ -987,6 +995,7 @@ public abstract interface class io/sentry/ISentryClient {
987995
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
988996
public fun captureException (Ljava/lang/Throwable;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
989997
public fun captureException (Ljava/lang/Throwable;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
998+
public abstract fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
990999
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
9911000
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
9921001
public abstract fun captureProfileChunk (Lio/sentry/ProfileChunk;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
@@ -1464,6 +1473,7 @@ public final class io/sentry/NoOpHub : io/sentry/IHub {
14641473
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
14651474
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
14661475
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
1476+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
14671477
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
14681478
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
14691479
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -1626,6 +1636,7 @@ public final class io/sentry/NoOpScopes : io/sentry/IScopes {
16261636
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
16271637
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
16281638
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
1639+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
16291640
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
16301641
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
16311642
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -2311,6 +2322,7 @@ public final class io/sentry/Scopes : io/sentry/IScopes {
23112322
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23122323
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
23132324
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
2325+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23142326
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
23152327
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23162328
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -2378,6 +2390,9 @@ public final class io/sentry/ScopesAdapter : io/sentry/IScopes {
23782390
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23792391
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
23802392
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
2393+
public fun captureFeedback (Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;
2394+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
2395+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23812396
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
23822397
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23832398
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -2487,6 +2502,9 @@ public final class io/sentry/Sentry {
24872502
public static fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
24882503
public static fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
24892504
public static fun captureException (Ljava/lang/Throwable;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
2505+
public static fun captureFeedback (Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;
2506+
public static fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
2507+
public static fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
24902508
public static fun captureMessage (Ljava/lang/String;)Lio/sentry/protocol/SentryId;
24912509
public static fun captureMessage (Ljava/lang/String;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
24922510
public static fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
@@ -2685,6 +2703,7 @@ public final class io/sentry/SentryClient : io/sentry/ISentryClient {
26852703
public fun captureCheckIn (Lio/sentry/CheckIn;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
26862704
public fun captureEnvelope (Lio/sentry/SentryEnvelope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
26872705
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
2706+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
26882707
public fun captureProfileChunk (Lio/sentry/ProfileChunk;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
26892708
public fun captureReplayEvent (Lio/sentry/SentryReplayEvent;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
26902709
public fun captureSession (Lio/sentry/Session;Lio/sentry/Hint;)V
@@ -3033,6 +3052,7 @@ public class io/sentry/SentryOptions {
30333052
public fun getBeforeBreadcrumb ()Lio/sentry/SentryOptions$BeforeBreadcrumbCallback;
30343053
public fun getBeforeEnvelopeCallback ()Lio/sentry/SentryOptions$BeforeEnvelopeCallback;
30353054
public fun getBeforeSend ()Lio/sentry/SentryOptions$BeforeSendCallback;
3055+
public fun getBeforeSendFeedback ()Lio/sentry/SentryOptions$BeforeSendCallback;
30363056
public fun getBeforeSendReplay ()Lio/sentry/SentryOptions$BeforeSendReplayCallback;
30373057
public fun getBeforeSendTransaction ()Lio/sentry/SentryOptions$BeforeSendTransactionCallback;
30383058
public fun getBundleIds ()Ljava/util/Set;
@@ -3161,6 +3181,7 @@ public class io/sentry/SentryOptions {
31613181
public fun setBeforeBreadcrumb (Lio/sentry/SentryOptions$BeforeBreadcrumbCallback;)V
31623182
public fun setBeforeEnvelopeCallback (Lio/sentry/SentryOptions$BeforeEnvelopeCallback;)V
31633183
public fun setBeforeSend (Lio/sentry/SentryOptions$BeforeSendCallback;)V
3184+
public fun setBeforeSendFeedback (Lio/sentry/SentryOptions$BeforeSendCallback;)V
31643185
public fun setBeforeSendReplay (Lio/sentry/SentryOptions$BeforeSendReplayCallback;)V
31653186
public fun setBeforeSendTransaction (Lio/sentry/SentryOptions$BeforeSendTransactionCallback;)V
31663187
public fun setCacheDirPath (Ljava/lang/String;)V
@@ -4698,6 +4719,7 @@ public class io/sentry/protocol/Contexts : io/sentry/JsonSerializable {
46984719
public fun getApp ()Lio/sentry/protocol/App;
46994720
public fun getBrowser ()Lio/sentry/protocol/Browser;
47004721
public fun getDevice ()Lio/sentry/protocol/Device;
4722+
public fun getFeedback ()Lio/sentry/protocol/Feedback;
47014723
public fun getGpu ()Lio/sentry/protocol/Gpu;
47024724
public fun getOperatingSystem ()Lio/sentry/protocol/OperatingSystem;
47034725
public fun getProfile ()Lio/sentry/ProfileContext;
@@ -4718,6 +4740,7 @@ public class io/sentry/protocol/Contexts : io/sentry/JsonSerializable {
47184740
public fun setApp (Lio/sentry/protocol/App;)V
47194741
public fun setBrowser (Lio/sentry/protocol/Browser;)V
47204742
public fun setDevice (Lio/sentry/protocol/Device;)V
4743+
public fun setFeedback (Lio/sentry/protocol/Feedback;)V
47214744
public fun setGpu (Lio/sentry/protocol/Gpu;)V
47224745
public fun setOperatingSystem (Lio/sentry/protocol/OperatingSystem;)V
47234746
public fun setProfile (Lio/sentry/ProfileContext;)V
@@ -4939,6 +4962,45 @@ public final class io/sentry/protocol/Device$JsonKeys {
49394962
public fun <init> ()V
49404963
}
49414964

4965+
public final class io/sentry/protocol/Feedback : io/sentry/JsonSerializable, io/sentry/JsonUnknown {
4966+
public static final field TYPE Ljava/lang/String;
4967+
public fun <init> (Lio/sentry/protocol/Feedback;)V
4968+
public fun <init> (Ljava/lang/String;)V
4969+
public fun equals (Ljava/lang/Object;)Z
4970+
public fun getAssociatedEventId ()Lio/sentry/protocol/SentryId;
4971+
public fun getContactEmail ()Ljava/lang/String;
4972+
public fun getMessage ()Ljava/lang/String;
4973+
public fun getName ()Ljava/lang/String;
4974+
public fun getReplayId ()Lio/sentry/protocol/SentryId;
4975+
public fun getUnknown ()Ljava/util/Map;
4976+
public fun getUrl ()Ljava/lang/String;
4977+
public fun hashCode ()I
4978+
public fun serialize (Lio/sentry/ObjectWriter;Lio/sentry/ILogger;)V
4979+
public fun setAssociatedEventId (Lio/sentry/protocol/SentryId;)V
4980+
public fun setContactEmail (Ljava/lang/String;)V
4981+
public fun setMessage (Ljava/lang/String;)V
4982+
public fun setName (Ljava/lang/String;)V
4983+
public fun setReplayId (Lio/sentry/protocol/SentryId;)V
4984+
public fun setUnknown (Ljava/util/Map;)V
4985+
public fun setUrl (Ljava/lang/String;)V
4986+
}
4987+
4988+
public final class io/sentry/protocol/Feedback$Deserializer : io/sentry/JsonDeserializer {
4989+
public fun <init> ()V
4990+
public fun deserialize (Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/Feedback;
4991+
public synthetic fun deserialize (Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Ljava/lang/Object;
4992+
}
4993+
4994+
public final class io/sentry/protocol/Feedback$JsonKeys {
4995+
public static final field ASSOCIATED_EVENT_ID Ljava/lang/String;
4996+
public static final field CONTACT_EMAIL Ljava/lang/String;
4997+
public static final field MESSAGE Ljava/lang/String;
4998+
public static final field NAME Ljava/lang/String;
4999+
public static final field REPLAY_ID Ljava/lang/String;
5000+
public static final field URL Ljava/lang/String;
5001+
public fun <init> ()V
5002+
}
5003+
49425004
public final class io/sentry/protocol/Geo : io/sentry/JsonSerializable, io/sentry/JsonUnknown {
49435005
public fun <init> ()V
49445006
public fun <init> (Lio/sentry/protocol/Geo;)V

sentry/src/main/java/io/sentry/Baggage.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,16 @@ public static Baggage fromHeader(
177177
@ApiStatus.Internal
178178
@NotNull
179179
public static Baggage fromEvent(
180-
final @NotNull SentryEvent event, final @NotNull SentryOptions options) {
180+
final @NotNull SentryBaseEvent event,
181+
final @Nullable String transaction,
182+
final @NotNull SentryOptions options) {
181183
final Baggage baggage = new Baggage(options.getLogger());
182184
final SpanContext trace = event.getContexts().getTrace();
183185
baggage.setTraceId(trace != null ? trace.getTraceId().toString() : null);
184186
baggage.setPublicKey(options.retrieveParsedDsn().getPublicKey());
185187
baggage.setRelease(event.getRelease());
186188
baggage.setEnvironment(event.getEnvironment());
187-
baggage.setTransaction(event.getTransaction());
189+
baggage.setTransaction(transaction);
188190
// we don't persist sample rate
189191
baggage.setSampleRate(null);
190192
baggage.setSampled(null);

sentry/src/main/java/io/sentry/DataCategory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public enum DataCategory {
88
All("__all__"),
99
Default("default"), // same as Error
1010
Error("error"),
11+
Feedback("feedback"),
1112
Session("session"),
1213
Attachment("attachment"),
1314
Monitor("monitor"),

sentry/src/main/java/io/sentry/HubAdapter.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.sentry;
22

3+
import io.sentry.protocol.Feedback;
34
import io.sentry.protocol.SentryId;
45
import io.sentry.protocol.SentryTransaction;
56
import io.sentry.protocol.User;
@@ -50,6 +51,22 @@ public boolean isEnabled() {
5051
return Sentry.captureMessage(message, level, callback);
5152
}
5253

54+
@Override
55+
public @NotNull SentryId captureFeedback(@NotNull Feedback feedback) {
56+
return Sentry.captureFeedback(feedback);
57+
}
58+
59+
@Override
60+
public @NotNull SentryId captureFeedback(@NotNull Feedback feedback, @Nullable Hint hint) {
61+
return Sentry.captureFeedback(feedback, hint);
62+
}
63+
64+
@Override
65+
public @NotNull SentryId captureFeedback(
66+
@NotNull Feedback feedback, @Nullable Hint hint, @Nullable ScopeCallback callback) {
67+
return Sentry.captureFeedback(feedback, hint, callback);
68+
}
69+
5370
@ApiStatus.Internal
5471
@Override
5572
public @NotNull SentryId captureEnvelope(@NotNull SentryEnvelope envelope, @Nullable Hint hint) {

sentry/src/main/java/io/sentry/HubScopesWrapper.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.sentry;
22

3+
import io.sentry.protocol.Feedback;
34
import io.sentry.protocol.SentryId;
45
import io.sentry.protocol.SentryTransaction;
56
import io.sentry.protocol.User;
@@ -46,6 +47,12 @@ public boolean isEnabled() {
4647
return scopes.captureMessage(message, level, callback);
4748
}
4849

50+
@Override
51+
public @NotNull SentryId captureFeedback(
52+
@NotNull Feedback feedback, @Nullable Hint hint, @Nullable ScopeCallback callback) {
53+
return scopes.captureFeedback(feedback, hint, callback);
54+
}
55+
4956
@Override
5057
public @NotNull SentryId captureEnvelope(@NotNull SentryEnvelope envelope, @Nullable Hint hint) {
5158
return scopes.captureEnvelope(envelope, hint);

0 commit comments

Comments
 (0)