Add INP as Core Web Vital for Playwright probes and deprecate FID#21
Open
m0nkey wants to merge 1 commit intobasecamp:mainfrom
Open
Add INP as Core Web Vital for Playwright probes and deprecate FID#21m0nkey wants to merge 1 commit intobasecamp:mainfrom
m0nkey wants to merge 1 commit intobasecamp:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopt INP as Core Web Vital and deprecate FID
INP (introduced May 2023) replaced FID as the responsiveness Core Web Vital (March 2024; FID removed from Chrome tools Sept 2024). This adds INP collection for Playwright probes and keeps FID as a deprecated, backward-compatible metric for now. FID should be considered for complete removal.
Changes
lib/upright/playwright/inp_observer.js(new)eventandfirst-inputvia PerformanceObserver, tracks worst interaction byinteractionId, stores value inwindow.upright.inp.app/models/concerns/upright/playwright/lifecycle.rbcontext.add_init_script(script: inp_observer_script)beforenew_page; script loaded withFile.read(Engine.root.join(...))like OtelTracing.lib/upright/playwright/collect_performance_metrics.jswindow.upright?.inp, assignsmetrics.inpwithMath.round(same pattern as other metrics). FID still collected; JSDoc@deprecated Use INP for responsiveness.browser.performance.*(ttfb, fcp, lcp, inp, fid), INP is responsiveness metric, FID deprecated.Tests
config_for(:playwright)andconnect_to_browser_server→ MockBrowser/MockContext; assert init script containswindow.upright,inp,PerformanceObserver.page.evaluateto return hash with inp/ttfb/fcp; assert span receivesset_attribute("browser.performance.inp", …)etc.add_init_script+init_script; MockPage:wait_for_load_state,evaluate.browser.performance.fid; Playwright probe tests pass.