@@ -26,6 +26,8 @@ import {ModulePageFilterBar} from 'sentry/views/insights/common/components/modul
26
26
import { ModulePageProviders } from 'sentry/views/insights/common/components/modulePageProviders' ;
27
27
import { ModulesOnboarding } from 'sentry/views/insights/common/components/modulesOnboarding' ;
28
28
import { ModuleBodyUpsellHook } from 'sentry/views/insights/common/components/moduleUpsellHookWrapper' ;
29
+ import CacheMissRateWidget from 'sentry/views/insights/common/components/widgets/cacheMissRateWidget' ;
30
+ import CacheThroughputWidget from 'sentry/views/insights/common/components/widgets/cacheThroughputWidget' ;
29
31
import {
30
32
useMetrics ,
31
33
useSpanMetrics ,
@@ -43,9 +45,7 @@ import {
43
45
SpanMetricsField ,
44
46
} from 'sentry/views/insights/types' ;
45
47
46
- import { InsightsLineChartWidget } from '../../common/components/insightsLineChartWidget' ;
47
48
import { useSamplesDrawer } from '../../common/utils/useSamplesDrawer' ;
48
- import { DataTitles , getThroughputChartTitle } from '../../common/views/spans/types' ;
49
49
50
50
const { CACHE_MISS_RATE } = SpanFunction ;
51
51
const { CACHE_ITEM_SIZE } = SpanMetricsField ;
@@ -79,11 +79,7 @@ export function CacheLandingPage() {
79
79
requiredParams : [ 'transaction' ] ,
80
80
} ) ;
81
81
82
- const {
83
- isPending : isCacheMissRateLoading ,
84
- data : cacheMissRateData ,
85
- error : cacheMissRateError ,
86
- } = useSpanMetricsSeries (
82
+ const { error : cacheMissRateError } = useSpanMetricsSeries (
87
83
{
88
84
yAxis : [ `${ CACHE_MISS_RATE } ()` ] ,
89
85
search : MutableSearch . fromQueryObject ( BASE_FILTERS ) ,
@@ -92,19 +88,6 @@ export function CacheLandingPage() {
92
88
Referrer . LANDING_CACHE_HIT_MISS_CHART
93
89
) ;
94
90
95
- const {
96
- isPending : isThroughputDataLoading ,
97
- data : throughputData ,
98
- error : throughputError ,
99
- } = useSpanMetricsSeries (
100
- {
101
- search : MutableSearch . fromQueryObject ( BASE_FILTERS ) ,
102
- yAxis : [ 'epm()' ] ,
103
- transformAliasToInputFormat : true ,
104
- } ,
105
- Referrer . LANDING_CACHE_THROUGHPUT_CHART
106
- ) ;
107
-
108
91
const {
109
92
isFetching : isTransactionsListFetching ,
110
93
data : transactionsList ,
@@ -209,20 +192,10 @@ export function CacheLandingPage() {
209
192
</ ModuleLayout . Full >
210
193
< ModulesOnboarding moduleName = { ModuleName . CACHE } >
211
194
< ModuleLayout . Half >
212
- < InsightsLineChartWidget
213
- title = { DataTitles [ `cache_miss_rate()` ] }
214
- series = { [ cacheMissRateData [ `${ CACHE_MISS_RATE } ()` ] ] }
215
- isLoading = { isCacheMissRateLoading }
216
- error = { cacheMissRateError }
217
- />
195
+ < CacheMissRateWidget />
218
196
</ ModuleLayout . Half >
219
197
< ModuleLayout . Half >
220
- < InsightsLineChartWidget
221
- title = { getThroughputChartTitle ( 'cache.get_item' ) }
222
- series = { [ throughputData [ 'epm()' ] ] }
223
- isLoading = { isThroughputDataLoading }
224
- error = { throughputError }
225
- />
198
+ < CacheThroughputWidget />
226
199
</ ModuleLayout . Half >
227
200
< ModuleLayout . Full >
228
201
< TransactionsTable
0 commit comments