Comments (7)
Questions:
- How monitoring will behave if
send
will be sent again before the callback or result returned? - Is it a valid scenario to do multiple
send
for oneopen
? - Will we detect long-poll ajax calls and adjust their processing so they do not make average ajax execution time enormously big?
- Do we instrument
abort
method? - is
Callbacks
only stored inXHR
object itself? If not - will it keep it from being garbage collected as it keeps delegates on it? - Will the
ajaxRecord
stay alive aftertrackAjax
call? Will Callbacks unsubscribe ofonreadystatechange
after that? - Do we plan to stop and send in-flight ajax calls on page
onbeforeunload
callback?
As a side note I'd advice to set a lock when you call original Open
and original Send
so that "originl" callback wouldn't call you back and enter recursion in case when customer application has some logic that also does override of XHR
and do not expect somebody in the middle to change callbacks.
from applicationinsights-js.
Thank you for the feedback:
- 2nd should fail (and does so in chrome), however we shouldn't execute send handler 2nd time. I'm adding validations for this.
- long ajax - I think they will be there, spoiling averages, and it's by design
- We do instrument abort however we currently don't send any data about abortion status. So depending on timing when abort was called - if request succeeds it'll be treated as any other ajax call. It makes sense to send the custom property with abortion status though.
- by callbacks i mean 2 different things 1) the xhr instance owns the onreadystatechange callback, it lives on xhr and dies with it. 2) there is an event listenerer for "readystatechange" event - this one lives on ajaxMonitor instance, however it gets unsubscribed once xhr is complete. Unless the number of xhr instances that are not completed (aborted or finished) grows we should be ok. Otherwise we'll not be major contributors to the memory growth.
- ajaxRecord dies with xhr
- onbeforeunload proved unusable for events sending, so all open ajaxes will be lost (similarly to other batched telemetry unless batch timeout and/or batch size is overriden)
from applicationinsights-js.
i noticed there's no milestone associated with this issue - any idea when this feature will be officially supported/fully documented?
from applicationinsights-js.
Hopefully within next couple weeks
from applicationinsights-js.
bump - any updates here?
from applicationinsights-js.
@bengreenier It's actually done - https://azure.microsoft.com/en-us/blog/ajax-collection-in-application-insights/
P.s. I thought I closed this issue - my bad it's left open, sorry.
from applicationinsights-js.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from applicationinsights-js.
Related Issues (20)
- [BUG] - CRITICAL - Application runs out of memory HOT 7
- [BUG] Filtering logs with status code 308 does not work HOT 2
- Deprecated feature used when using with jQuery 3.7.1 HOT 8
- [BUG] `ITelemetryItem` uses intersection type instead of union type for `tags` property HOT 4
- [BUG] Network calls aren't visualized correctly between frontend(AI-JS) / backend(Azure Otel Distro) components in Application Map HOT 2
- [BUG] [Web-Snippet] dependency chain issues
- [BUG] Event time is not set HOT 4
- [BUG] @microsoft/applicationinsights-web-snippet version 1.1.1 type problem
- `console.log` unnecessarily noisy HOT 3
- Need to add max retry count for telemetry events to prevent events accumulation in sent buffer
- [Offline Support] offline support plugin can't be added to extensions of core config now, it can only be added through addPlugin
- [main] retry document updates HOT 1
- [BUG] remove 403 as a “retriable” error code
- [BUG] Circular dependencies
- ApplicationInsights-JS latest version 3.1.1 giving TypeError: Cannot read properties of undefined (reading 'getCrypto') HOT 32
- [BUG] Excessive memory usage for SPA where unload hooks keep accumulating HOT 2
- ClickAnalyticsPlugin extension should have html tag configurability HOT 1
- Is there a suggested method for dealing with browsers disallowing third party cookies without disabling cookies altogether? HOT 3
- [Question] Best practices for throttling outgoing data? HOT 4
- Provide Telemetry Throttling from client side
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.