import DiscoverFeature from 'sentry/components/discover/discoverFeature'; import Link from 'sentry/components/links/link'; import {MessageRow} from 'sentry/components/performance/waterfall/messageRow'; import {t, tct} from 'sentry/locale'; import {Organization} from 'sentry/types'; import EventView from 'sentry/utils/discover/eventView'; import {TraceMeta} from 'sentry/utils/performance/quickTrace/types'; import {TraceInfo} from 'sentry/views/performance/traceDetails/types'; interface LimitExceededMessageProps { meta: TraceMeta | null; organization: Organization; traceEventView: EventView; traceInfo: TraceInfo; } function LimitExceededMessage({ traceInfo, traceEventView, organization, meta, }: LimitExceededMessageProps) { const count = traceInfo.transactions.size; const totalTransactions = meta?.transactions ?? count; if (totalTransactions === null || count >= totalTransactions) { return null; } const target = traceEventView.getResultsViewUrlTarget(organization.slug); return ( {tct( 'Limited to a view of [count] transactions. To view the full list, [discover].', { count, discover: ( {({hasFeature}) => ( {t('Open in Discover')} )} ), } )} ); } export default LimitExceededMessage;