The Grafana Faro Web SDK, part of the Grafana Faro project, is a highly configurable web SDK for real user monitoring (RUM) that instruments browser frontend applications to capture observability signals. Frontend telemetry can then be correlated with backend and infrastructure data for full-stack observability.
If DOM storage is diabled teh web-sdk got stuck in a loop.
This is because in the updateSession we fetch a session from DOM storage, validate it and then either update the last activity timestamp of the valid session or create a new session.
In case DOM storage is not available, we always get a null value for stored session which is invalid.
So we only update the in-memory session meta with the new session.
Creating a new session via this function is basically a session extend, so it causes a session extend event to be send, which in turn leads to that the update function is called again, which cuases teh inifnifte loop beacuse the above steps are executed over and over again.
Why
If DOM storage is diabled teh web-sdk got stuck in a loop.
This is because in the
updateSession
we fetch a session from DOM storage, validate it and then either update the last activity timestamp of the valid session or create a new session.In case DOM storage is not available, we always get a
null
value for stored session which is invalid. So we only update the in-memory session meta with the new session. Creating a new session via this function is basically a session extend, so it causes a session extend event to be send, which in turn leads to that the update function is called again, which cuases teh inifnifte loop beacuse the above steps are executed over and over again.Responsible part of the update function
What
Check if DOM storage is availble and if not don't execute the update (session_extend).
This will still gives send data and sessionID, but:
Links
Checklist