Skip to content

Commit

Permalink
fix(feedback): Replay breadcrumb for feedback events was incorrect (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
billyvg authored and mydea committed Feb 7, 2024
1 parent 5a9f460 commit 11576d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EventType } from '@sentry-internal/rrweb';
import type { FeedbackEvent } from '@sentry/types';

import type { ReplayContainer } from '../../types';
import type { ReplayBreadcrumbFrameEvent, ReplayContainer } from '../../types';

/**
* Add a feedback breadcrumb event to replay.
Expand All @@ -21,16 +21,17 @@ export function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEv
type: EventType.Custom,
timestamp: event.timestamp * 1000,
data: {
timestamp: event.timestamp,
tag: 'breadcrumb',
payload: {
timestamp: event.timestamp,
type: 'default',
category: 'sentry.feedback',
data: {
feedbackId: event.event_id,
},
},
},
});
} as ReplayBreadcrumbFrameEvent);

return false;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/types/replayFrame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ interface ReplayOptionFrame {
}

interface ReplayFeedbackFrameData {
feedback_id: string;
feedbackId: string;
}

interface ReplayFeedbackFrame extends ReplayBaseBreadcrumbFrame {
Expand Down

0 comments on commit 11576d6

Please sign in to comment.