File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
static/app/views/insights Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
import type { EventsMetaType } from 'sentry/utils/discover/eventView' ;
2
+ import { DiscoverDatasets } from 'sentry/utils/discover/types' ;
2
3
import { useApiQuery } from 'sentry/utils/queryClient' ;
3
4
import { MutableSearch } from 'sentry/utils/tokenizeSearch' ;
4
5
import { useLocation } from 'sentry/utils/useLocation' ;
@@ -7,6 +8,7 @@ import usePageFilters from 'sentry/utils/usePageFilters';
7
8
import { computeAxisMax } from 'sentry/views/insights/common/components/chart' ;
8
9
import { useSpanMetricsSeries } from 'sentry/views/insights/common/queries/useDiscoverSeries' ;
9
10
import { getDateConditions } from 'sentry/views/insights/common/utils/getDateConditions' ;
11
+ import { useInsightsEap } from 'sentry/views/insights/common/utils/useEap' ;
10
12
import type {
11
13
SpanIndexedFieldTypes ,
12
14
SpanIndexedProperty ,
@@ -141,6 +143,7 @@ export const useSpanSamples = <Fields extends NonDefaultSpanSampleFields[]>(
141
143
SpanIndexedField . TRANSACTION_SPAN_ID , // TODO: transaction.span_id should be a default from the backend
142
144
...additionalFields ,
143
145
] ,
146
+ dataset : useInsightsEap ( ) ? DiscoverDatasets . SPANS_EAP : undefined ,
144
147
sort : `-${ SPAN_SELF_TIME } ` ,
145
148
} ,
146
149
} ,
Original file line number Diff line number Diff line change 2
2
3
3
import { defined } from 'sentry/utils' ;
4
4
import type { EventsMetaType } from 'sentry/utils/discover/eventView' ;
5
+ import { DiscoverDatasets } from 'sentry/utils/discover/types' ;
5
6
import { useApiQuery } from 'sentry/utils/queryClient' ;
6
7
import type { MutableSearch } from 'sentry/utils/tokenizeSearch' ;
7
8
import useOrganization from 'sentry/utils/useOrganization' ;
@@ -11,6 +12,7 @@ import type {
11
12
NonDefaultSpanSampleFields ,
12
13
} from 'sentry/views/insights/common/queries/useSpanSamples' ;
13
14
import { getDateConditions } from 'sentry/views/insights/common/utils/getDateConditions' ;
15
+ import { useInsightsEap } from 'sentry/views/insights/common/utils/useEap' ;
14
16
import { SpanIndexedField , type SpanIndexedResponse } from 'sentry/views/insights/types' ;
15
17
16
18
interface UseSpanSamplesOptions < Fields > {
@@ -67,6 +69,7 @@ export const useSpanSamples = <Fields extends NonDefaultSpanSampleFields[]>(
67
69
// TODO: transaction.span_id should be a default from the backend
68
70
additionalFields : [ ...fields , SpanIndexedField . TRANSACTION_SPAN_ID ] ,
69
71
sort : '-timestamp' ,
72
+ dataset : useInsightsEap ( ) ? DiscoverDatasets . SPANS_EAP : undefined ,
70
73
referrer,
71
74
} ,
72
75
} ,
You can’t perform that action at this time.
0 commit comments