Skip to content

Commit 41743be

Browse files
authored
Merge 212ffbf into 0f2e104
2 parents 0f2e104 + 212ffbf commit 41743be

39 files changed

+1250
-61
lines changed

CHANGELOG.md

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

33
## Unreleased
44

5+
### Features
6+
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
9+
510
### Dependencies
611

712
- Bump Gradle from v8.13 to v8.14.0 ([#4360](https://github.com/getsentry/sentry-java/pull/4360))

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import io.sentry.SentryReplayEvent
2121
import io.sentry.Session
2222
import io.sentry.TraceContext
2323
import io.sentry.UserFeedback
24+
import io.sentry.protocol.Feedback
2425
import io.sentry.protocol.SentryId
2526
import io.sentry.protocol.SentryTransaction
2627
import io.sentry.transport.RateLimiter
@@ -147,6 +148,10 @@ class SessionTrackingIntegrationTest {
147148
TODO("Not yet implemented")
148149
}
149150

151+
override fun captureFeedback(feedback: Feedback, hint: Hint?, scope: IScope): SentryId {
152+
TODO("Not yet implemented")
153+
}
154+
150155
override fun captureReplayEvent(
151156
event: SentryReplayEvent,
152157
scope: IScope?,

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("[email protected]");
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("[email protected]");
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 ProfileChunkUi 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;
@@ -1469,6 +1478,7 @@ public final class io/sentry/NoOpHub : io/sentry/IHub {
14691478
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
14701479
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
14711480
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
1481+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
14721482
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
14731483
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
14741484
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -1631,6 +1641,7 @@ public final class io/sentry/NoOpScopes : io/sentry/IScopes {
16311641
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
16321642
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
16331643
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
1644+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
16341645
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
16351646
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
16361647
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -2328,6 +2339,7 @@ public final class io/sentry/Scopes : io/sentry/IScopes {
23282339
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23292340
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
23302341
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
2342+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23312343
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
23322344
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23332345
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -2395,6 +2407,9 @@ public final class io/sentry/ScopesAdapter : io/sentry/IScopes {
23952407
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23962408
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
23972409
public fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
2410+
public fun captureFeedback (Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;
2411+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
2412+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
23982413
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
23992414
public fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
24002415
public fun captureProfileChunk (Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;
@@ -2504,6 +2519,9 @@ public final class io/sentry/Sentry {
25042519
public static fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
25052520
public static fun captureException (Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
25062521
public static fun captureException (Ljava/lang/Throwable;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
2522+
public static fun captureFeedback (Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;
2523+
public static fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
2524+
public static fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
25072525
public static fun captureMessage (Ljava/lang/String;)Lio/sentry/protocol/SentryId;
25082526
public static fun captureMessage (Ljava/lang/String;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;
25092527
public static fun captureMessage (Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;
@@ -2702,6 +2720,7 @@ public final class io/sentry/SentryClient : io/sentry/ISentryClient {
27022720
public fun captureCheckIn (Lio/sentry/CheckIn;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
27032721
public fun captureEnvelope (Lio/sentry/SentryEnvelope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
27042722
public fun captureEvent (Lio/sentry/SentryEvent;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
2723+
public fun captureFeedback (Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
27052724
public fun captureProfileChunk (Lio/sentry/ProfileChunk;Lio/sentry/IScope;)Lio/sentry/protocol/SentryId;
27062725
public fun captureReplayEvent (Lio/sentry/SentryReplayEvent;Lio/sentry/IScope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;
27072726
public fun captureSession (Lio/sentry/Session;Lio/sentry/Hint;)V
@@ -3050,6 +3069,7 @@ public class io/sentry/SentryOptions {
30503069
public fun getBeforeBreadcrumb ()Lio/sentry/SentryOptions$BeforeBreadcrumbCallback;
30513070
public fun getBeforeEnvelopeCallback ()Lio/sentry/SentryOptions$BeforeEnvelopeCallback;
30523071
public fun getBeforeSend ()Lio/sentry/SentryOptions$BeforeSendCallback;
3072+
public fun getBeforeSendFeedback ()Lio/sentry/SentryOptions$BeforeSendCallback;
30533073
public fun getBeforeSendReplay ()Lio/sentry/SentryOptions$BeforeSendReplayCallback;
30543074
public fun getBeforeSendTransaction ()Lio/sentry/SentryOptions$BeforeSendTransactionCallback;
30553075
public fun getBundleIds ()Ljava/util/Set;
@@ -3179,6 +3199,7 @@ public class io/sentry/SentryOptions {
31793199
public fun setBeforeBreadcrumb (Lio/sentry/SentryOptions$BeforeBreadcrumbCallback;)V
31803200
public fun setBeforeEnvelopeCallback (Lio/sentry/SentryOptions$BeforeEnvelopeCallback;)V
31813201
public fun setBeforeSend (Lio/sentry/SentryOptions$BeforeSendCallback;)V
3202+
public fun setBeforeSendFeedback (Lio/sentry/SentryOptions$BeforeSendCallback;)V
31823203
public fun setBeforeSendReplay (Lio/sentry/SentryOptions$BeforeSendReplayCallback;)V
31833204
public fun setBeforeSendTransaction (Lio/sentry/SentryOptions$BeforeSendTransactionCallback;)V
31843205
public fun setCacheDirPath (Ljava/lang/String;)V
@@ -4717,6 +4738,7 @@ public class io/sentry/protocol/Contexts : io/sentry/JsonSerializable {
47174738
public fun getApp ()Lio/sentry/protocol/App;
47184739
public fun getBrowser ()Lio/sentry/protocol/Browser;
47194740
public fun getDevice ()Lio/sentry/protocol/Device;
4741+
public fun getFeedback ()Lio/sentry/protocol/Feedback;
47204742
public fun getGpu ()Lio/sentry/protocol/Gpu;
47214743
public fun getOperatingSystem ()Lio/sentry/protocol/OperatingSystem;
47224744
public fun getProfile ()Lio/sentry/ProfileContext;
@@ -4737,6 +4759,7 @@ public class io/sentry/protocol/Contexts : io/sentry/JsonSerializable {
47374759
public fun setApp (Lio/sentry/protocol/App;)V
47384760
public fun setBrowser (Lio/sentry/protocol/Browser;)V
47394761
public fun setDevice (Lio/sentry/protocol/Device;)V
4762+
public fun setFeedback (Lio/sentry/protocol/Feedback;)V
47404763
public fun setGpu (Lio/sentry/protocol/Gpu;)V
47414764
public fun setOperatingSystem (Lio/sentry/protocol/OperatingSystem;)V
47424765
public fun setProfile (Lio/sentry/ProfileContext;)V
@@ -4958,6 +4981,45 @@ public final class io/sentry/protocol/Device$JsonKeys {
49584981
public fun <init> ()V
49594982
}
49604983

4984+
public final class io/sentry/protocol/Feedback : io/sentry/JsonSerializable, io/sentry/JsonUnknown {
4985+
public static final field TYPE Ljava/lang/String;
4986+
public fun <init> (Lio/sentry/protocol/Feedback;)V
4987+
public fun <init> (Ljava/lang/String;)V
4988+
public fun equals (Ljava/lang/Object;)Z
4989+
public fun getAssociatedEventId ()Lio/sentry/protocol/SentryId;
4990+
public fun getContactEmail ()Ljava/lang/String;
4991+
public fun getMessage ()Ljava/lang/String;
4992+
public fun getName ()Ljava/lang/String;
4993+
public fun getReplayId ()Lio/sentry/protocol/SentryId;
4994+
public fun getUnknown ()Ljava/util/Map;
4995+
public fun getUrl ()Ljava/lang/String;
4996+
public fun hashCode ()I
4997+
public fun serialize (Lio/sentry/ObjectWriter;Lio/sentry/ILogger;)V
4998+
public fun setAssociatedEventId (Lio/sentry/protocol/SentryId;)V
4999+
public fun setContactEmail (Ljava/lang/String;)V
5000+
public fun setMessage (Ljava/lang/String;)V
5001+
public fun setName (Ljava/lang/String;)V
5002+
public fun setReplayId (Lio/sentry/protocol/SentryId;)V
5003+
public fun setUnknown (Ljava/util/Map;)V
5004+
public fun setUrl (Ljava/lang/String;)V
5005+
}
5006+
5007+
public final class io/sentry/protocol/Feedback$Deserializer : io/sentry/JsonDeserializer {
5008+
public fun <init> ()V
5009+
public fun deserialize (Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/Feedback;
5010+
public synthetic fun deserialize (Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Ljava/lang/Object;
5011+
}
5012+
5013+
public final class io/sentry/protocol/Feedback$JsonKeys {
5014+
public static final field ASSOCIATED_EVENT_ID Ljava/lang/String;
5015+
public static final field CONTACT_EMAIL Ljava/lang/String;
5016+
public static final field MESSAGE Ljava/lang/String;
5017+
public static final field NAME Ljava/lang/String;
5018+
public static final field REPLAY_ID Ljava/lang/String;
5019+
public static final field URL Ljava/lang/String;
5020+
public fun <init> ()V
5021+
}
5022+
49615023
public final class io/sentry/protocol/Geo : io/sentry/JsonSerializable, io/sentry/JsonUnknown {
49625024
public fun <init> ()V
49635025
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)