Skip to content

test(browser): Register the LCP handlers in the bundle of the SDK - #25263

Merged
chargome merged 1 commit into
developfrom
chargome/test/browser-lcp-handlers-shared-observer
Oct 12, 2026
Merged

chargome merged 1 commit into
developfrom
chargome/test/browser-lcp-handlers-shared-observer

Conversation

@chargome

@chargome chargome commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Fixes a flaky test. The handlers-lcp test registered its LCP handlers in a separate bundle, so they watched LCP through their own observer and sometimes saw a different element than the SDK did on Linux CI. Now the handlers are registered in the same bundle as the SDK, so they see exactly what the SDK sees.

The handlers lived in the subject bundle, which got its own copy of the
instrumentation and so an LCP observer of its own. On Linux CI that copy
sometimes only ever saw the body candidate while the SDK's copy saw the
image, so the handler assertions failed on every run of some trees and
timed out in others. In the bundle of the SDK the handlers share its
observer and see exactly what the span reports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chargome chargome self-assigned this Oct 12, 2026
@chargome
chargome marked this pull request as ready for review October 12, 2026 11:22
@chargome
chargome requested a review from a team as a code owner October 12, 2026 11:22
@chargome
chargome requested review from a team, logaretm, msonnb and nicohrubec and removed request for a team October 12, 2026 11:22
@chargome
chargome merged commit 203765a into develop Oct 12, 2026
117 of 119 checks passed
@chargome
chargome deleted the chargome/test/browser-lcp-handlers-shared-observer branch October 12, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants