Comments (5)
But we are still seeing some (around 25%) ping request never getting resolved (we waited over 10mins).
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 ???
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)
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.
from applicationinsights-js.
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 npm
package is already published and the CDN will be updated within the next hour.
from applicationinsights-js.
Sorry, got distracted by performing the release steps for v3.0.7 on this
The ping calls never resolve, they stay pending infinitely.
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 sendBeacon
API or when available the fetch()
(with the keep-alive flag set). Previously (before these API's existed) we use to send the events as synchronous XMLHttpRequests (which are now banned) and this API blocked page navigation until all of the events are sent and responses received.
With the sendBeacon
and fetch
(with keep-alive) both of these API's have a maximum payload size limit of 64kb, so if (when) you have more than 64kb of serialized events (JSON encoded) we need to "split" the payload into multiple requests (at the least) and if the API's tell us that it could not accept the payload (even if we constructed a size < 64kb) then we go into a mode where we try and send as many events as possible (1 event per-request) until we are told that no more can be scheduled.
Why are there so many request?
- Part of the answer is the above
- The other part is that are part of some recent refactoring (in v3.0.3) we introduced an edge case bug where when this sequence occurs we went into a loop which caused events to be sent more than once 😢
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)
from applicationinsights-js.
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.
from applicationinsights-js.
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) ?
from applicationinsights-js.
Related Issues (20)
- [BUG] Custom properties added with addTelemetryInitializer are ignored for first PageVisitTime track event HOT 2
- Support for Chrome Extension HOT 9
- Can clickanalyticsplugin can track the sharepoint webpart HOT 1
- [BUG] Beacon sender causes flood of thousands of requests on page unload HOT 10
- [BUG] using EndPointUrl (and IngestionEndpoint) results in Telemetry sent to incorrect urls HOT 12
- [BUG] Custom events do not report client_OS correctly HOT 1
- What is the future of this package with the recent shift to Open Telemetry? HOT 4
- [BUG] applicationinsights.azure.com/v2/track making hundreds of thousands of requests when third party cookies are disabled HOT 10
- [BUG]: snippet sends pageView if enableAutoRouteTracking = false HOT 1
- [BUG]: snippet does not collect unhandled rejections while sdk load HOT 1
- [BUG] Beacon sender reports error for success when diagnostics are enabled
- [BUG] Duplicate customEvent entries HOT 15
- [BUG] stopTrackEvent requires property values to be strings HOT 7
- https://dc.services.visualstudio.com/v2/track returning 400 bad request in case of log out HOT 3
- Application insight disable local auth HOT 1
- Chrome: Deprecation - Unload event listeners are deprecated and will be removed HOT 5
- Question: Where does the id show up? HOT 3
- how to fix "NullInjectorError: No provider for AppInsightsSku!" HOT 2
- Add `customSpan` telemetry type HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-js.