Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restiming entries not added to beacon on xhr_load #356

Open
vkbandi opened this issue Jun 24, 2024 · 0 comments
Open

restiming entries not added to beacon on xhr_load #356

vkbandi opened this issue Jun 24, 2024 · 0 comments

Comments

@vkbandi
Copy link

vkbandi commented Jun 24, 2024

Hi,

When xhr_load event is invoked, the following line passes data.restiming as parameter r to the addToBeacon function

boomerang/plugins/restiming.js

Lines 1759 to 1773 in c0cbec6

xhr_load: function(data) {
if (data && data.restiming) {
// put RT data on beacon
addToBeacon(data.restiming);
}
if (this.complete) {
return;
}
// page load might not have happened, or will happen later, so
// set us as complete so we don't hold the page load
this.complete = true;
BOOMR.sendBeacon();
},

The addToBeacon function again checks for r.restiming, in the xhr_load event call this will be undefined as r is the restiming data and it will not have a field called restiming inside it

boomerang/plugins/restiming.js

Lines 1693 to 1699 in c0cbec6

function addToBeacon(r) {
BOOMR.addVar("restiming", JSON.stringify(r.restiming), true);
if (r.servertiming.length) {
BOOMR.addVar("servertiming", BOOMR.utils.serializeForUrl(r.servertiming), true);
}
}

This causes the restiming entries added to the beacon on xhr_load to be missed in the beacon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant