raygun4js icon indicating copy to clipboard operation
raygun4js copied to clipboard

Tracking resources when the resourcetimingbuffer is full

Open BenjaminHarding opened this issue 3 years ago • 0 comments

Morning! Found this out recently and thought I'd share as it might be applicable :)

Browsers have a maximum number of PerformanceResourceTimings that they allow you to access via the window.performance.getEntries and window.performance.getEntriesByType API. From testing, I've found Firefox / Chrome this sits around 250 and for Safari this sits at like 150.

Note: PerformanceObservers for the most part don't have this limitation (but unless something has changed) this limitation is still in place.

This means if a browser reaches the resource buffer limit RUM would stop gathering resource timings and sending timings. Which is particularly useful for SPA applications.

There is a resourcetimingbufferfull event however that could be used along the clearResourceTimings to continue to get information.

BenjaminHarding avatar Jun 17 '21 21:06 BenjaminHarding