Skip to content

Commit 11576d6

Browse files
billyvgmydea
authored andcommitted
fix(feedback): Replay breadcrumb for feedback events was incorrect (#10536)
We are creating a replay breadcrumb when user feedback was submitted, however, the it was not typed correctly, which the timestamp not being included in the proper location.
1 parent 5a9f460 commit 11576d6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/replay/src/coreHandlers/util/addFeedbackBreadcrumb.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { EventType } from '@sentry-internal/rrweb';
22
import type { FeedbackEvent } from '@sentry/types';
33

4-
import type { ReplayContainer } from '../../types';
4+
import type { ReplayBreadcrumbFrameEvent, ReplayContainer } from '../../types';
55

66
/**
77
* Add a feedback breadcrumb event to replay.
@@ -21,16 +21,17 @@ export function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEv
2121
type: EventType.Custom,
2222
timestamp: event.timestamp * 1000,
2323
data: {
24-
timestamp: event.timestamp,
2524
tag: 'breadcrumb',
2625
payload: {
26+
timestamp: event.timestamp,
27+
type: 'default',
2728
category: 'sentry.feedback',
2829
data: {
2930
feedbackId: event.event_id,
3031
},
3132
},
3233
},
33-
});
34+
} as ReplayBreadcrumbFrameEvent);
3435

3536
return false;
3637
});

packages/replay/src/types/replayFrame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ interface ReplayOptionFrame {
128128
}
129129

130130
interface ReplayFeedbackFrameData {
131-
feedback_id: string;
131+
feedbackId: string;
132132
}
133133

134134
interface ReplayFeedbackFrame extends ReplayBaseBreadcrumbFrame {

0 commit comments

Comments
 (0)