DataDog / browser-sdk

Datadog Browser SDK
Apache License 2.0
289 stars 130 forks source link

💡 Prerendering support #2859

Open cole opened 1 month ago

cole commented 1 month ago

When implementing the Speculation Rules API and prerendering a page, Datadog RUM timings for the page (specifically LCP and FCP) are from when the prerender started on the referring page, rather than activation.

This means prerendering causes an increase in timings that doesn't reflect the user experience, which is improved (sometimes dramatically) by prerendering.

Note that the web-vitals library handles prerenders by timing from activation start, as implemented in this changeset.

thomas-lebeau commented 1 month ago

Hi @cole, Thank you for pointing out this issue with the Speculatation Rules API. We're planning to look into this issue.