@@ -21,12 +21,13 @@ import {
21
21
} from 'sentry/views/insights/cache/components/tables/transactionsTable' ;
22
22
import { Referrer } from 'sentry/views/insights/cache/referrers' ;
23
23
import { BASE_FILTERS , MODULE_DOC_LINK } from 'sentry/views/insights/cache/settings' ;
24
- import { InsightsLineChartWidget } from 'sentry/views/insights/common/components/insightsLineChartWidget' ;
25
24
import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout' ;
26
25
import { ModulePageFilterBar } from 'sentry/views/insights/common/components/modulePageFilterBar' ;
27
26
import { ModulePageProviders } from 'sentry/views/insights/common/components/modulePageProviders' ;
28
27
import { ModulesOnboarding } from 'sentry/views/insights/common/components/modulesOnboarding' ;
29
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' ;
30
31
import {
31
32
useMetrics ,
32
33
useSpanMetrics ,
@@ -37,10 +38,6 @@ import {useOnboardingProject} from 'sentry/views/insights/common/queries/useOnbo
37
38
import { useInsightsEap } from 'sentry/views/insights/common/utils/useEap' ;
38
39
import { useSamplesDrawer } from 'sentry/views/insights/common/utils/useSamplesDrawer' ;
39
40
import { QueryParameterNames } from 'sentry/views/insights/common/views/queryParameters' ;
40
- import {
41
- DataTitles ,
42
- getThroughputChartTitle ,
43
- } from 'sentry/views/insights/common/views/spans/types' ;
44
41
import { BackendHeader } from 'sentry/views/insights/pages/backend/backendPageHeader' ;
45
42
import {
46
43
type MetricsProperty ,
@@ -81,11 +78,7 @@ export function CacheLandingPage() {
81
78
requiredParams : [ 'transaction' ] ,
82
79
} ) ;
83
80
84
- const {
85
- isPending : isCacheMissRateLoading ,
86
- data : cacheMissRateData ,
87
- error : cacheMissRateError ,
88
- } = useSpanMetricsSeries (
81
+ const { error : cacheMissRateError } = useSpanMetricsSeries (
89
82
{
90
83
yAxis : [ `${ CACHE_MISS_RATE } ()` ] ,
91
84
search : MutableSearch . fromQueryObject ( BASE_FILTERS ) ,
@@ -94,19 +87,6 @@ export function CacheLandingPage() {
94
87
Referrer . LANDING_CACHE_HIT_MISS_CHART
95
88
) ;
96
89
97
- const {
98
- isPending : isThroughputDataLoading ,
99
- data : throughputData ,
100
- error : throughputError ,
101
- } = useSpanMetricsSeries (
102
- {
103
- search : MutableSearch . fromQueryObject ( BASE_FILTERS ) ,
104
- yAxis : [ 'epm()' ] ,
105
- transformAliasToInputFormat : true ,
106
- } ,
107
- Referrer . LANDING_CACHE_THROUGHPUT_CHART
108
- ) ;
109
-
110
90
const {
111
91
isFetching : isTransactionsListFetching ,
112
92
data : transactionsList ,
@@ -211,20 +191,10 @@ export function CacheLandingPage() {
211
191
</ ModuleLayout . Full >
212
192
< ModulesOnboarding moduleName = { ModuleName . CACHE } >
213
193
< ModuleLayout . Half >
214
- < InsightsLineChartWidget
215
- title = { DataTitles [ `cache_miss_rate()` ] }
216
- series = { [ cacheMissRateData [ `${ CACHE_MISS_RATE } ()` ] ] }
217
- isLoading = { isCacheMissRateLoading }
218
- error = { cacheMissRateError }
219
- />
194
+ < CacheMissRateWidget />
220
195
</ ModuleLayout . Half >
221
196
< ModuleLayout . Half >
222
- < InsightsLineChartWidget
223
- title = { getThroughputChartTitle ( 'cache.get_item' ) }
224
- series = { [ throughputData [ 'epm()' ] ] }
225
- isLoading = { isThroughputDataLoading }
226
- error = { throughputError }
227
- />
197
+ < CacheThroughputWidget />
228
198
</ ModuleLayout . Half >
229
199
< ModuleLayout . Full >
230
200
< TransactionsTable
0 commit comments