Skip to content

Commit bf29277

Browse files
feat(webvitals): Check if ttfb exists to determine proper no data state (#59912)
Check if ttfb exists to determine proper no data state
1 parent b9d1b70 commit bf29277

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/app/views/performance/browser/webVitals/utils/getWebVitalValues.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export function getWebVitalsFromTableData(data: TableDataRow) {
1717
const hasFcp = hasWebVital(data, 'fcp');
1818
const hasCls = hasWebVital(data, 'cls');
1919
const hasFid = hasWebVital(data, 'fid');
20-
// TODO: waiting for backend to allowlist ttfb
21-
const hasTtfb = true;
20+
const hasTtfb = hasWebVital(data, 'ttfb');
2221

2322
return {
2423
lcp: hasLcp ? getWebVital(data, 'lcp') : null,

static/app/views/performance/browser/webVitals/utils/useProjectWebVitalsQuery.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const useProjectWebVitalsQuery = ({transaction, tag, dataset}: Props = {}
3030
'count_web_vitals(measurements.fcp, any)',
3131
'count_web_vitals(measurements.cls, any)',
3232
'count_web_vitals(measurements.fid, any)',
33+
'count_web_vitals(measurements.ttfb, any)',
3334
'count()',
3435
'failure_count()',
3536
'p95(transaction.duration)',

0 commit comments

Comments
 (0)