Skip to content

Commit 5baa3a8

Browse files
feat(webvitals): Adds a description for INP (#64110)
Adds INP descriptions and constants for future use in performance.
1 parent 77cb12b commit 5baa3a8

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

static/app/utils/fields/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export enum WebVital {
144144
FID = 'measurements.fid',
145145
CLS = 'measurements.cls',
146146
TTFB = 'measurements.ttfb',
147+
INP = 'measurements.inp',
147148
REQUEST_TIME = 'measurements.ttfb.requesttime',
148149
}
149150

@@ -470,6 +471,11 @@ export const MEASUREMENT_FIELDS: Record<WebVital | MobileVital, FieldDefinition>
470471
kind: FieldKind.METRICS,
471472
valueType: FieldValueType.DURATION,
472473
},
474+
[WebVital.INP]: {
475+
desc: t('Web Vital Interaction to Next Paint'),
476+
kind: FieldKind.METRICS,
477+
valueType: FieldValueType.DURATION,
478+
},
473479
};
474480

475481
export const SPAN_OP_FIELDS: Record<SpanOpBreakdown, FieldDefinition> = {

static/app/utils/performance/vitals/constants.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ export const WEB_VITAL_DETAILS: Record<WebVital, Vital> = {
4444
poorThreshold: 300,
4545
type: measurementType(WebVital.FID),
4646
},
47+
[WebVital.INP]: {
48+
slug: 'inp',
49+
name: t('Interaction to Next Paint'),
50+
acronym: 'INP',
51+
description: t(
52+
'The duration of the longest interaction observed, ignoring outliers.'
53+
),
54+
poorThreshold: 500,
55+
type: measurementType(WebVital.INP),
56+
},
4757
[WebVital.CLS]: {
4858
slug: 'cls',
4959
name: t('Cumulative Layout Shift'),

static/app/views/performance/browser/webVitals/components/webVitalDescription.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const WEB_VITAL_FULL_NAME_MAP = {
3535
cls: t('Cumulative Layout Shift'),
3636
fcp: t('First Contentful Paint'),
3737
fid: t('First Input Delay'),
38+
inp: t('Interaction to Next Paint'),
3839
lcp: t('Largest Contentful Paint'),
3940
ttfb: t('Time to First Byte'),
4041
};
@@ -55,6 +56,9 @@ const VITAL_DESCRIPTIONS: Partial<Record<WebVital, string>> = {
5556
[WebVital.TTFB]: t(
5657
'Time to First Byte (TTFB) is a foundational metric for measuring connection setup time and web server responsiveness in both the lab and the field. It helps identify when a web server is too slow to respond to requests. In the case of navigation requests—that is, requests for an HTML document—it precedes every other meaningful loading performance metric.'
5758
),
59+
[WebVital.INP]: t(
60+
"Interaction to Next Paint (INP) is a metric that assesses a page's overall responsiveness to user interactions by observing the latency of all click, tap, and keyboard interactions that occur throughout the lifespan of a user's visit to a page. The final INP value is the longest interaction observed, ignoring outliers."
61+
),
5862
};
5963

6064
type WebVitalDetailHeaderProps = {

0 commit comments

Comments
 (0)