@@ -13,33 +13,23 @@ import {DatePageFilter} from 'sentry/components/pageFilters/date/datePageFilter'
1313import { EnvironmentPageFilter } from 'sentry/components/pageFilters/environment/environmentPageFilter' ;
1414import { PageFilterBar } from 'sentry/components/pageFilters/pageFilterBar' ;
1515import { normalizeDateTimeParams } from 'sentry/components/pageFilters/parse' ;
16- import { usePageFilters } from 'sentry/components/pageFilters/usePageFilters' ;
17- import { useSpanSearchQueryBuilderProps } from 'sentry/components/performance/spanSearchQueryBuilder' ;
1816import { TransactionSearchQueryBuilder } from 'sentry/components/performance/transactionSearchQueryBuilder' ;
1917import { t } from 'sentry/locale' ;
2018import { DataCategory } from 'sentry/types/core' ;
2119import type { Organization } from 'sentry/types/organization' ;
2220import type { Project } from 'sentry/types/project' ;
2321import { trackAnalytics } from 'sentry/utils/analytics' ;
24- import { encodeSort } from 'sentry/utils/discover/eventView' ;
2522import type { EventView } from 'sentry/utils/discover/eventView' ;
2623import { SavedQueryDatasets } from 'sentry/utils/discover/types' ;
2724import type { WebVital } from 'sentry/utils/fields' ;
28- import { decodeScalar , decodeSorts } from 'sentry/utils/queryString' ;
25+ import { decodeScalar } from 'sentry/utils/queryString' ;
2926import { projectSupportsReplay } from 'sentry/utils/replays/projectSupportsReplay' ;
30- import { MutableSearch } from 'sentry/utils/tokenizeSearch' ;
3127import { useDatePageFilterProps } from 'sentry/utils/useDatePageFilterProps' ;
3228import { useMaxPickableDays } from 'sentry/utils/useMaxPickableDays' ;
3329import { useNavigate } from 'sentry/utils/useNavigate' ;
3430import { useRoutes } from 'sentry/utils/useRoutes' ;
3531import { hasDatasetSelector } from 'sentry/views/dashboards/utils' ;
36- import { TraceItemSearchQueryBuilder } from 'sentry/views/explore/components/traceItemSearchQueryBuilder' ;
37- import { Mode } from 'sentry/views/explore/contexts/pageParamsContext/mode' ;
38- import { getExploreUrl } from 'sentry/views/explore/utils' ;
39- import { QueryParameterNames } from 'sentry/views/insights/common/views/queryParameters' ;
4032import { useDomainViewFilters } from 'sentry/views/insights/pages/useFilters' ;
41- import { SampledEventsTable } from 'sentry/views/performance/eap/sampledEventsTable' ;
42- import { useTransactionSummaryEAP } from 'sentry/views/performance/eap/useTransactionSummaryEAP' ;
4333import type { SpanOperationBreakdownFilter } from 'sentry/views/performance/transactionSummary/filter' ;
4434import {
4535 Filter ,
@@ -54,27 +44,6 @@ import {
5444import { EventsTable } from './eventsTable' ;
5545import { EventsDisplayFilterName , getEventsFilterOptions } from './utils' ;
5646
57- function EAPSearchBar ( {
58- projects,
59- initialQuery,
60- onSearch,
61- } : {
62- initialQuery : string ;
63- onSearch : ( query : string ) => void ;
64- projects : number [ ] ;
65- } ) {
66- const { spanSearchQueryBuilderProps} = useSpanSearchQueryBuilderProps ( {
67- projects,
68- initialQuery,
69- onSearch,
70- searchSource : 'transaction_events' ,
71- } ) ;
72-
73- return (
74- < TraceItemSearchQueryBuilder { ...spanSearchQueryBuilderProps } disallowFreeText />
75- ) ;
76- }
77-
7847type Props = {
7948 eventView : EventView ;
8049 eventsDisplayFilterName : EventsDisplayFilterName ;
@@ -117,13 +86,8 @@ export function EventsContent(props: Props) {
11786 const routes = useRoutes ( ) ;
11887 const theme = useTheme ( ) ;
11988 const domainViewFilters = useDomainViewFilters ( ) ;
120- const shouldUseEAP = useTransactionSummaryEAP ( ) ;
12189
12290 const { eventView, titles} = useMemo ( ( ) => {
123- if ( shouldUseEAP ) {
124- return { eventView : originalEventView , titles : [ ] } ;
125- }
126-
12791 const eventViewClone = originalEventView . clone ( ) ;
12892 const transactionsListTitles = TRANSACTIONS_LIST_TITLES . slice ( ) ;
12993 const project = projects . find ( p => p . id === projectId ) ;
@@ -196,7 +160,6 @@ export function EventsContent(props: Props) {
196160 titles : transactionsListTitles ,
197161 } ;
198162 } , [
199- shouldUseEAP ,
200163 originalEventView ,
201164 location ,
202165 organization ,
@@ -206,19 +169,7 @@ export function EventsContent(props: Props) {
206169 webVital ,
207170 ] ) ;
208171
209- const { eventsDisplayFilterName, percentileValues} = props ;
210- const maxDuration =
211- eventsDisplayFilterName === EventsDisplayFilterName . P100
212- ? undefined
213- : percentileValues ?. [ eventsDisplayFilterName ] ;
214-
215- const table = shouldUseEAP ? (
216- < SampledEventsTable
217- eventView = { eventView }
218- transactionName = { transactionName }
219- maxDuration = { maxDuration }
220- />
221- ) : (
172+ const table = (
222173 < EventsTable
223174 theme = { theme }
224175 eventView = { eventView }
@@ -283,41 +234,30 @@ function Search(props: Props) {
283234 } ;
284235
285236 const projectIds = useMemo ( ( ) => eventView . project ?. slice ( ) , [ eventView . project ] ) ;
286- const shouldUseEAP = useTransactionSummaryEAP ( ) ;
287237
288238 const maxPickableDays = useMaxPickableDays ( {
289- dataCategories : [ shouldUseEAP ? DataCategory . SPANS : DataCategory . TRANSACTIONS ] ,
239+ dataCategories : [ DataCategory . TRANSACTIONS ] ,
290240 } ) ;
291241 const datePageFilterProps = useDatePageFilterProps ( maxPickableDays ) ;
292242
293243 return (
294- < FilterActions eap = { shouldUseEAP } >
295- { ! shouldUseEAP && (
296- < Filter
297- organization = { organization }
298- currentFilter = { spanOperationBreakdownFilter }
299- onChangeFilter = { onChangeSpanOperationBreakdownFilter }
300- />
301- ) }
244+ < FilterActions >
245+ < Filter
246+ organization = { organization }
247+ currentFilter = { spanOperationBreakdownFilter }
248+ onChangeFilter = { onChangeSpanOperationBreakdownFilter }
249+ />
302250 < PageFilterBar condensed >
303251 < EnvironmentPageFilter />
304252 < DatePageFilter { ...datePageFilterProps } />
305253 </ PageFilterBar >
306- < StyledSearchBarWrapper eap = { shouldUseEAP } >
307- { shouldUseEAP ? (
308- < EAPSearchBar
309- projects = { projectIds ?? [ ] }
310- initialQuery = { query }
311- onSearch = { handleSearch }
312- />
313- ) : (
314- < TransactionSearchQueryBuilder
315- projects = { projectIds }
316- initialQuery = { query }
317- onSearch = { handleSearch }
318- searchSource = "transaction_events"
319- />
320- ) }
254+ < StyledSearchBarWrapper >
255+ < TransactionSearchQueryBuilder
256+ projects = { projectIds }
257+ initialQuery = { query }
258+ onSearch = { handleSearch }
259+ searchSource = "transaction_events"
260+ />
321261 </ StyledSearchBarWrapper >
322262 < CompactSelect
323263 trigger = { triggerProps => (
@@ -330,98 +270,38 @@ function Search(props: Props) {
330270 label : filter . label ,
331271 } ) ) }
332272 />
333- { ! shouldUseEAP && (
334- < LinkButton
335- to = { eventView . getResultsViewUrlTarget (
336- organization ,
337- false ,
338- hasDatasetSelector ( organization ) ? SavedQueryDatasets . TRANSACTIONS : undefined
339- ) }
340- onClick = { handleDiscoverButtonClick }
341- >
342- { t ( 'Open in Discover' ) }
343- </ LinkButton >
344- ) }
345- { shouldUseEAP && < OpenInExploreButton { ...props } /> }
273+ < LinkButton
274+ to = { eventView . getResultsViewUrlTarget (
275+ organization ,
276+ false ,
277+ hasDatasetSelector ( organization ) ? SavedQueryDatasets . TRANSACTIONS : undefined
278+ ) }
279+ onClick = { handleDiscoverButtonClick }
280+ >
281+ { t ( 'Open in Discover' ) }
282+ </ LinkButton >
346283 </ FilterActions >
347284 ) ;
348285}
349286
350- function OpenInExploreButton ( {
351- location,
352- organization,
353- transactionName,
354- eventsDisplayFilterName,
355- percentileValues,
356- } : Pick <
357- Props ,
358- | 'location'
359- | 'organization'
360- | 'transactionName'
361- | 'eventsDisplayFilterName'
362- | 'percentileValues'
363- > ) {
364- const { selection} = usePageFilters ( ) ;
365-
366- if ( ! organization . features . includes ( 'visibility-explore-view' ) ) {
367- return null ;
368- }
369-
370- const searchQuery = decodeScalar ( location . query . query , '' ) ;
371- const sort = decodeSorts ( location . query ?. [ QueryParameterNames . SPANS_SORT ] ) [ 0 ] ?? {
372- field : 'timestamp' ,
373- kind : 'desc' as const ,
374- } ;
375-
376- const query = new MutableSearch ( searchQuery ) ;
377- query . setFilterValues ( 'is_transaction' , [ 'true' ] ) ;
378- query . setFilterValues ( 'transaction' , [ transactionName ] ) ;
379-
380- const maxDuration =
381- eventsDisplayFilterName === EventsDisplayFilterName . P100
382- ? undefined
383- : percentileValues ?. [ eventsDisplayFilterName ] ;
384- if ( maxDuration !== undefined && maxDuration > 0 ) {
385- query . setFilterValues ( 'span.duration' , [ `<=${ maxDuration . toFixed ( 0 ) } ` ] ) ;
386- }
387-
388- const exploreUrl = getExploreUrl ( {
389- organization,
390- selection,
391- mode : Mode . SAMPLES ,
392- query : query . formatString ( ) ,
393- field : [ 'span_id' , 'request.method' , 'span.duration' , 'trace' , 'timestamp' ] ,
394- sort : encodeSort ( sort ) ,
395- } ) ;
396-
397- return < LinkButton to = { exploreUrl } > { t ( 'Open in Explore' ) } </ LinkButton > ;
398- }
399-
400- const FilterActions = styled ( 'div' ) < { eap : boolean } > `
287+ const FilterActions = styled ( 'div' ) `
401288 display: grid;
402289 gap: ${ p => p . theme . space . xl } ;
403290 margin-bottom: ${ p => p . theme . space . xl } ;
404291
405292 @media (min-width: ${ p => p . theme . breakpoints . sm } ) {
406- grid-template-columns: ${ p =>
407- p . eap ? 'auto 1fr auto auto' : 'repeat(4, min-content)' } ;
293+ grid-template-columns: repeat(4, min-content);
408294 }
409295
410296 @media (min-width: ${ p => p . theme . breakpoints . xl } ) {
411- grid-template-columns: ${ p =>
412- p . eap ? 'auto 1fr auto auto' : 'auto auto 1fr auto auto' } ;
297+ grid-template-columns: auto auto 1fr auto auto;
413298 }
414299` ;
415300
416- const StyledSearchBarWrapper = styled ( 'div' ) < { eap : boolean } > `
301+ const StyledSearchBarWrapper = styled ( 'div' ) `
417302 @media (min-width: ${ p => p . theme . breakpoints . sm } ) {
418- ${ p =>
419- p . eap
420- ? ''
421- : `
422- order: 1;
423- grid-column: 1/6;
424- ` }
303+ order: 1;
304+ grid-column: 1/6;
425305 }
426306
427307 @media (min-width: ${ p => p . theme . breakpoints . xl } ) {
0 commit comments