Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion static/app/utils/replays/hydrateBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ export default function hydrateBreadcrumbs(
}
return {
...frame,
// Logcat and Timber are used for mobile replays and are considered a console frame instead of a custom breadcrumb frame
// custom frames might not have a defined category, so we need to set one
category: frame.category || defaultTitle(frame) || 'custom',
category:
frame.category === 'Logcat' || frame.category === 'Timber'
? 'console'
: frame.category || defaultTitle(frame) || 'custom',
offsetMs: Math.abs(time.getTime() - startTimestampMs),
timestamp: time,
timestampMs: time.getTime(),
Expand Down
3 changes: 2 additions & 1 deletion static/app/utils/replays/replayReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
getNodeIds,
IncrementalSource,
isCLSFrame,
isConsoleFrame,
isDeadClick,
isDeadRageClick,
isPaintFrame,
Expand Down Expand Up @@ -507,7 +508,7 @@ export default class ReplayReader {
getErrorFrames = () => this._errors;

getConsoleFrames = memoize(() =>
this._sortedBreadcrumbFrames.filter(frame => frame.category === 'console')
this._sortedBreadcrumbFrames.filter(frame => isConsoleFrame(frame))
);

getNavigationFrames = memoize(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import type {SelectOption} from 'sentry/components/compactSelect';
import {defined} from 'sentry/utils';
import {decodeList, decodeScalar} from 'sentry/utils/queryString';
import useFiltersInLocationQuery from 'sentry/utils/replays/hooks/useFiltersInLocationQuery';
import type {BreadcrumbFrame, ConsoleFrame} from 'sentry/utils/replays/types';
import {
type BreadcrumbFrame,
type ConsoleFrame,
isConsoleFrame,
} from 'sentry/utils/replays/types';
import {filterItems} from 'sentry/views/replays/detail/utils';

export interface ConsoleSelectOption extends SelectOption<string> {
Expand All @@ -32,7 +36,7 @@ type Return = {
};

function getFilterableField(frame: BreadcrumbFrame) {
if (frame.category === 'console') {
if (isConsoleFrame(frame)) {
const consoleFrame = frame as ConsoleFrame;
return consoleFrame.level;
}
Expand Down
Loading