-
Notifications
You must be signed in to change notification settings - Fork 293
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
t_done,t_page and rt.tt values are negative on SPA #339
Comments
Hi @annitsb , do you have a public site that you could share that reproduces the issue? Boomerang SPA monitoring doesn't capture scroll events. Could you describe the workflow that happens when a scroll occurs? History API calls, XHRs, etc. |
Hi QueryMetrics, We don't have site which is public, it is internal application. When i do slow scroll i dont see negative value but when i do scrolling fast, i am able to reproduce negative values for t_done, t_page, rt.tt |
@annitsb do you have your own scroll handler that fires XHRs or something else when scrolls happen? Boomerang itself doesn't look at scrolling so something else is firing network transitions. If your site is doing something during scroll, it may be useful to implement some kind of throttling or debouncing for the scroll event. See https://css-tricks.com/debouncing-throttling-explained-examples/ for some information. |
On scroll, whenever switched to different tab, we have this code in application history.replaceState |
@annitsb please include the code that you mention. |
angular SPA application have below java script function , this function will be called on SCROLL on page. addAnchorToUrl(t) {
let a = window.location.href.split("#")[0] + "#!" + t;
history.replaceState(null, null, a),
this.anchor = t
} And in boomerang i can see below code in History.js plugin if (impl.monitorReplaceState && typeof history.replaceState === "function") {
history.replaceState = (function(_replaceState) {
return function(state, title, url) {
var fromUrl = BOOMR.window.document.URL, toUrl = fromUrl; As i said initially i see negative value only when i scroll page fast, if i scroll page slowly and give some pause, then i get correct data. |
Will look into why this is happening, but just FYI, there is a bug in your code. Using |
we are currently checking for Chrome and Edge. Issue is more frequently reproducible in Chrome |
Hi bluesmoon, Any update on this? |
No, I don't see anything in the code that would cause the values to be negative. |
Ok, so what will happen if user set history.replacestate. how beacon fired?. and please help me in understanding how rt.tstart and rt.end values are assigned? because i see rt.end is less than rt.tstart. and t_done = rt.end-rt.tstart which gives negative value. i am curious to know how rt.end can be less than rt.tstart |
when you call |
Thank you bluesmoon. I will do some analysis around application and check end time is less than start time. |
Can you run a debug version of boomerang and post the console logs when you see a negative timer? |
how to run debug version of boomerang |
Hello @annitsb The build process automatically creates a debug build. After you build Boomerang, then could you check the build folder for file that end with You should have something similar to: |
Hi ceckoslab, Please find console logs |
@annitsb very interesting ... your boomerang is called I see some debug info but I am not sure that this is really a debug build because I would expect the log to be much more verbose. Could you please share unminified debug version from your boomerang? |
Please find attachment. It was not allowing to attach javascript, so i changes ext to txt |
any update on this issue? |
Hello again @annitsb I looked at the share log and the Boomerang build but I still can't find why this could be happening. The log that you shared previously seems to be filtered. Could you send a full log only with Boomerang messages? Also is it possible to share the code where you call |
Hi Team,
Recently we have found an issue in one of the SPA application where t_done is negative. I did analysis around and i found on page scroll SPA beacon is fired and rt.end value is less than rt.start value. I am using auto-xhr, history and spa plugins. Below is the beacon
rt.start: manual
rt.tstart: 1669688701496
rt.nstart: 1669688573336
rt.bstart: 1669688575259
rt.end: 1669688700932
t_resp: 0
t_page: -564
t_done: -564
rt.tt: -3742
The text was updated successfully, but these errors were encountered: