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
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ import styled from '@emotion/styled';

import {ButtonBar} from 'sentry/components/core/button/buttonBar';
import {LinkButton} from 'sentry/components/core/button/linkButton';
import {TRACE_WATERFALL_PREFERENCES_KEY} from 'sentry/components/events/interfaces/performance/utils';
import {
isWebVitalsEvent,
TRACE_WATERFALL_PREFERENCES_KEY,
} from 'sentry/components/events/interfaces/performance/utils';
import {getEventTimestampInSeconds} from 'sentry/components/events/interfaces/utils';
import {generateTraceTarget} from 'sentry/components/quickTrace/utils';
import {t} from 'sentry/locale';
import {type Event} from 'sentry/types/event';
import {getIssueTypeFromOccurrenceType, IssueType, type Group} from 'sentry/types/group';
import {type Group} from 'sentry/types/group';
import type {Organization} from 'sentry/types/organization';
import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig';
import useRouteAnalyticsParams from 'sentry/utils/routeAnalytics/useRouteAnalyticsParams';
Expand Down Expand Up @@ -131,10 +134,6 @@ const IssuesTraceContainer = styled('div')`
position: relative;
`;

const isWebVitalsEvent = (event: Event) => {
return getIssueTypeFromOccurrenceType(event.occurrence?.type) === IssueType.WEB_VITALS; // Web Vitals group type id
};

interface EventTraceViewProps {
event: Event;
group: Group;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
TraceContextSpanProxy,
} from 'sentry/components/events/interfaces/spans/types';
import type {EntrySpans, EventTransaction} from 'sentry/types/event';
import {EntryType} from 'sentry/types/event';
import {EntryType, type Event} from 'sentry/types/event';
import {getIssueTypeFromOccurrenceType, IssueType} from 'sentry/types/group';

export const TRACE_WATERFALL_PREFERENCES_KEY =
Expand Down Expand Up @@ -97,3 +97,7 @@ export function getProblemSpansForSpanTree(event: EventTransaction): {

return {affectedSpanIds, focusedSpanIds};
}

export const isWebVitalsEvent = (event: Event) => {
return getIssueTypeFromOccurrenceType(event.occurrence?.type) === IssueType.WEB_VITALS; // Web Vitals group type id
};
3 changes: 2 additions & 1 deletion static/app/components/quickTrace/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type {Location, LocationDescriptor} from 'history';
import moment from 'moment-timezone';

import {isWebVitalsEvent} from 'sentry/components/events/interfaces/performance/utils';
import {getTraceDateTimeRange} from 'sentry/components/events/interfaces/spans/utils';
import {getEventTimestampInSeconds} from 'sentry/components/events/interfaces/utils';
import {normalizeDateTimeParams} from 'sentry/components/organizations/pageFilters/parse';
Expand Down Expand Up @@ -42,7 +43,7 @@ export function generateTraceTarget(
organization,
traceSlug: traceId,
dateSelection,
timestamp: getEventTimestampInSeconds(event),
timestamp: isWebVitalsEvent(event) ? undefined : getEventTimestampInSeconds(event),
eventId: event.eventID,
location,
source,
Expand Down
Loading