-
Notifications
You must be signed in to change notification settings - Fork 239
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
[BUG] Retry on sampled out telemetry is looping infinitely #2227
Comments
This isn't specifically a sampling issue, I (think) it's related to this issue #2205, which we are currently publishing a fix for. The |
Sorry, got distracted by performing the release steps for v3.0.7 on this
This is a side effect of the browser "queuing" the requests, according to the specification, the browser is eventually supposed to send the batch events. What is happening here is that during the page unload, we go into "send all batched events now" mode (so they are not lost), as part of this process we use either the With the Why are there so many request?
We believe that we have now fix the introduced these edge cases and we have also introduced a new configuration that you can use to disable this behavior if your use-cases causes the frequent splitting / sending of multiple "pings" during page unload / navigation (which is also triggered by switching tabs) |
This issue has been closed, because it was linked to the v3.0.7 release which is now fully deployed. If this version doesn't resolve your issue (or you just want more information), please feel free to continue commenting as if it's not fixed we can reopen and further investigate. |
Thanks! The version 3.0.7 definitely fixed this issue. But we are still seeing some (around 25%) ping request never getting resolved (we waited over 10mins). We were stress testing our app with 50 000 logs to be sent over to appinsight using the trackEvent function. We are sending 1000 logs every 30 secs. Like you said, when we switch tabs the ping requests get sent, but some of them never resolve ? Also, we set our sampling to 50% on our microsoft azure application insights, but every single log sent from the client browser with the trackEvent function are getting a 206 (Telemetry sampled out) ? |
This is underlying browser functionality and I'm not sure exactly on "when" it would send out the requests, just that based on the specification once a browser "accepts" the request it is supposed to guarantee that it will deliver the request (I don't recall if there is a time limit involved as part of the spec). So either this is a browser bug (where it's not sending it) or just a UI issue where teh dev tools don't get updated ???
Hmm, not sure why that would be as one would expect the sampling to be based on some form of randomness (not a direct part of my team), maybe they are using a combination of the source location / time or something. I'll ping some people to see if I can find an answer on why or whether this was just bad timing / luck. |
Description/Screenshot
When we activate sampling in applicationInsights the SDK appears to retry over and over again on each logs that was sampled out. The ping calls never resolve, they stay pending infinitely.
Even though setting the sampling at 100% the track calls are returning a 200 response status code which do not trigger the retry logic, we should be able to reduce sampling without having this side effect on the client side
Steps to Reproduce
Expected behavior
The sampled telemetry do not get resent
Additional context
The text was updated successfully, but these errors were encountered: