Dependency (AJAX) in Application Insights

About 50% of the points registered in our database are Dependency (AJAX).

Where is it from?

I think that these "Dependency (AJAX)" began to appear after I turned on the web sockets in the application settings of my web application (we use signalr).

The Command property of these data points has a value of / signalr / ping, so this definitely has something to do with signalr.

I would like to exclude them because it uses too many of my free plans for available data points.

Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule is already disabled in my ApplicationInsights.config.

EDIT

I tried disabling web sockets, but still getting these logs.

EDIT 2016-02-24

As suggested by Alex, I set disableAjaxTracking: true, but that didn't help.

Here is the appInsights code in <head>my html.

<script type="text/javascript">
    var appInsights = window.appInsights || function (config) {
        function r(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, u = document, e = window, o = "script", s = u.createElement(o), i, f; for (s.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", u.getElementsByTagName(o)[0].parentNode.appendChild(s), t.cookie = u.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) r("track" + i.pop()); return r("setAuthenticatedUserContext"), r("clearAuthenticatedUserContext"), config.disableExceptionTracking || (i = "onerror", r("_" + i), f = e[i], e[i] = function (config, r, u, e, o) { var s = f && f(config, r, u, e, o); return s !== !0 && t["_" + i](config, r, u, e, o), s }), t
    }({
        instrumentationKey: "@Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.Active.InstrumentationKey",
        disableAjaxTracking: true
    });
    window.appInsights = appInsights;
    appInsights.trackPageView();
</script>
@if (Request.IsAuthenticated)
{
    <script>
        appInsights.setAuthenticatedUserContext("@User.Identity.Name".replace(/[,;=| ]+/g, "_"));
    </script>
}
+4
source share
1 answer

Starting in late December 2015, the Application Insights JavaScript SDK automatically collects AJAX requests. Here 's a blog post about it . Since its inclusion, we have also entered the maximum maximum amount of AJAX requests that can be registered on the page, by default 500, but you can change this parameter by adding this property to your fragment (more about this in the blog and related documentation):

maxAjaxCallsPerView: <number>

You can also disable the AJAX alltogether request collection using this parameter:

disableAjaxTracking: true

EDIT: disableAjaxTracking 2/24/2016, ,

maxAjaxCallsPerView: 0
+2

Source: https://habr.com/ru/post/1623129/


All Articles