diff --git a/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx b/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx index 861699ac6d562f..f9f57301ff4871 100644 --- a/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx +++ b/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx @@ -18,7 +18,7 @@ import {formatPercentage} from 'sentry/utils/number/formatPercentage'; import {unreachable} from 'sentry/utils/unreachable'; export interface EventRegressionTableRow { - group: string; + group: string | null; operation: string; percentageChange: number; description?: string; @@ -99,8 +99,8 @@ export function EventRegressionTable({ ) : data.length === 0 ? ( {t('No results found for your query')} ) : ( - data.map(row => ( - + data.map((row, index) => ( + {columns.map(column => ( ; - group?: string; + group?: string | null; shortDescription?: string; } @@ -33,7 +33,10 @@ export function FullSpanDescription({ }: Props) { const {data: indexedSpans, isFetching: areIndexedSpansLoading} = useSpans( { - search: MutableSearch.fromQueryObject({'span.group': group, ...filters}), + search: MutableSearch.fromQueryObject({ + 'span.group': group ?? undefined, + ...filters, + }), limit: 1, fields: [ SpanFields.PROJECT_ID, @@ -104,7 +107,7 @@ export function FullSpanDescription({ type TruncatedQueryClipBoxProps = { children: ReactNode; - group: string | undefined; + group: string | null | undefined; }; function QueryClippedBox({group, children}: TruncatedQueryClipBoxProps) { @@ -114,16 +117,20 @@ function QueryClippedBox({group, children}: TruncatedQueryClipBoxProps) { return ( , - onClick: () => - navigate({ - pathname: `${databaseURL}/spans/span/${group}`, - query: {...location.query, isExpanded: true}, - }), - }} + buttonProps={ + group + ? { + icon: , + onClick: () => + navigate({ + pathname: `${databaseURL}/spans/span/${group}`, + query: {...location.query, isExpanded: true}, + }), + } + : undefined + } > {children} diff --git a/static/app/views/insights/common/components/spanDescription.tsx b/static/app/views/insights/common/components/spanDescription.tsx index 2212b9bac0a823..7f262feb786616 100644 --- a/static/app/views/insights/common/components/spanDescription.tsx +++ b/static/app/views/insights/common/components/spanDescription.tsx @@ -49,7 +49,7 @@ export function DatabaseSpanDescription({ const {data: indexedSpans, isFetching: areIndexedSpansLoading} = useSpans( { - search: MutableSearch.fromQueryObject({'span.group': groupId}), + search: MutableSearch.fromQueryObject({'span.group': groupId ?? undefined}), limit: 1, fields: [ SpanFields.PROJECT_ID, diff --git a/static/app/views/insights/common/components/spanGroupDetailsLink.tsx b/static/app/views/insights/common/components/spanGroupDetailsLink.tsx index d0cc9f26c49941..13b9f8901c649c 100644 --- a/static/app/views/insights/common/components/spanGroupDetailsLink.tsx +++ b/static/app/views/insights/common/components/spanGroupDetailsLink.tsx @@ -17,7 +17,7 @@ interface Props { moduleName: ModuleName.DB | ModuleName.RESOURCE; projectId: number; extraLinkQueryParams?: Record; - group?: string; + group?: string | null; spanOp?: string; } diff --git a/static/app/views/insights/common/components/tableCells/spanDescriptionCell.tsx b/static/app/views/insights/common/components/tableCells/spanDescriptionCell.tsx index c7dec474f85a96..1a7eeeba366277 100644 --- a/static/app/views/insights/common/components/tableCells/spanDescriptionCell.tsx +++ b/static/app/views/insights/common/components/tableCells/spanDescriptionCell.tsx @@ -19,7 +19,7 @@ interface Props { moduleName: ModuleName.DB | ModuleName.RESOURCE; projectId: number; extraLinkQueryParams?: Record; - group?: string; + group?: string | null; spanAction?: string; spanOp?: string; system?: string; diff --git a/static/app/views/insights/common/components/widgets/overviewSlowNextjsSSRWidget.tsx b/static/app/views/insights/common/components/widgets/overviewSlowNextjsSSRWidget.tsx index b8b8fd914dc7ab..745b78883d4177 100644 --- a/static/app/views/insights/common/components/widgets/overviewSlowNextjsSSRWidget.tsx +++ b/static/app/views/insights/common/components/widgets/overviewSlowNextjsSSRWidget.tsx @@ -39,7 +39,7 @@ export default function OverviewSlowNextjsSSRWidget(props: LoadableChartWidgetPr const pageFilterChartParams = usePageFilterChartParams(); const {query} = useTransactionNameQuery(); - const fullQuery = `span.op:function.nextjs ${query}`; + const fullQuery = `has:${SpanFields.SPAN_GROUP} ${SpanFields.SPAN_OP}:function.nextjs ${query}`; const spansRequest = useSpans( { diff --git a/static/app/views/insights/common/components/widgets/overviewTimeConsumingQueriesWidget.tsx b/static/app/views/insights/common/components/widgets/overviewTimeConsumingQueriesWidget.tsx index 543843021d4f37..d77edbc0181c12 100644 --- a/static/app/views/insights/common/components/widgets/overviewTimeConsumingQueriesWidget.tsx +++ b/static/app/views/insights/common/components/widgets/overviewTimeConsumingQueriesWidget.tsx @@ -52,7 +52,7 @@ export default function OverviewTimeConsumingQueriesWidget( const supportedSystems = Object.values(SupportedDatabaseSystem); const search = new MutableSearch( - `${SpanFields.DB_SYSTEM}:[${supportedSystems.join(',')}] ${query}`.trim() + `has:${SpanFields.SPAN_GROUP} ${SpanFields.DB_SYSTEM}:[${supportedSystems.join(',')}] ${query}`.trim() ); const referrer = Referrer.OVERVIEW_TIME_CONSUMING_QUERIES_WIDGET; const groupBy = SpanFields.NORMALIZED_DESCRIPTION; diff --git a/static/app/views/insights/types.tsx b/static/app/views/insights/types.tsx index 82b374c14fe1dc..40a0285d19a2c6 100644 --- a/static/app/views/insights/types.tsx +++ b/static/app/views/insights/types.tsx @@ -314,7 +314,6 @@ export type NonNullableStringFields = | SpanFields.FILE_EXTENSION | SpanFields.SPAN_OP | SpanFields.SPAN_DESCRIPTION - | SpanFields.SPAN_GROUP | SpanFields.SPAN_CATEGORY | SpanFields.SPAN_SYSTEM | SpanFields.TIMESTAMP @@ -331,7 +330,7 @@ export type NonNullableStringFields = | SpanFields.USER_DISPLAY | SpanFields.SENTRY_ORIGIN; -type NullableStringFields = SpanFields.NORMALIZED_DESCRIPTION; +type NullableStringFields = SpanFields.NORMALIZED_DESCRIPTION | SpanFields.SPAN_GROUP; export type SpanStringFields = NullableStringFields | NonNullableStringFields;