ApplicationInsights-JS | Microsoft Application Insights SDK for JavaScript | Monitoring library

 by   microsoft TypeScript Version: 3.0.1 License: MIT

kandi X-RAY | ApplicationInsights-JS Summary

kandi X-RAY | ApplicationInsights-JS Summary

ApplicationInsights-JS is a TypeScript library typically used in Performance Management, Monitoring applications. ApplicationInsights-JS has no vulnerabilities, it has a Permissive License and it has low support. However ApplicationInsights-JS has 18 bugs. You can download it from GitHub.

Microsoft Application Insights SDK for JavaScript
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ApplicationInsights-JS has a low active ecosystem.
              It has 598 star(s) with 232 fork(s). There are 116 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 89 open issues and 805 have been closed. On average issues are closed in 238 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ApplicationInsights-JS is 3.0.1

            kandi-Quality Quality

              ApplicationInsights-JS has 18 bugs (0 blocker, 0 critical, 18 major, 0 minor) and 4 code smells.

            kandi-Security Security

              ApplicationInsights-JS has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ApplicationInsights-JS code analysis shows 0 unresolved vulnerabilities.
              There are 21 security hotspots that need review.

            kandi-License License

              ApplicationInsights-JS is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              ApplicationInsights-JS releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              ApplicationInsights-JS saves you 458 person hours of effort in developing the same functionality from scratch.
              It has 1596 lines of code, 0 functions and 376 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ApplicationInsights-JS and discovered the below as its top functions. This is intended to give you an instant insight into ApplicationInsights-JS implemented functionality, and help decide if they suit your requirements.
            • This is the function that is called each time it is the integrator s function .
            • Extract the name of the input file
            • Remove dynamic methods from a source file .
            • Build module config
            • Creates a new XML - analysis view .
            • Replaces the tslib library with the given paths .
            • Parse dts from a file
            • determine if name should be processed
            • An instance of the context key .
            • Creates a diagnostics message
            Get all kandi verified functions for this library.

            ApplicationInsights-JS Key Features

            No Key Features are available at this moment for ApplicationInsights-JS.

            ApplicationInsights-JS Examples and Code Snippets

            No Code Snippets are available at this moment for ApplicationInsights-JS.

            Community Discussions

            QUESTION

            Compiler fails - ERROR in No NgModule metadata found for 'AppModule'
            Asked 2021-Dec-14 at 19:01

            Compile fails with this error. I have looked through all the posts with similar titles and not found anything helpful yet. Angular 7. I was trying to update some dependencies to resolve prod vulnerabilities, the change list for this was moving angular-devkit/build-angular to dev dependencies, removing abandoned and unused packages, adding ngx-toastr 10, upgrading jasmine-core from 3.3 to 3.8.

            I have deleted, cleared cache, and reinstalled all node packages and then tried specifically doing that to angular/cli (7.1.1) and webpack (4.12.0). Edited+saved a random ts file. Added app/app.module.ts specifically to tsconfig.app.json's files param and include param. Added strictMetadataEmit:false to tsconfig.json and tsconfig.app.json compilerOptions (unknown compiler param error).

            tsconfig.json

            ...

            ANSWER

            Answered 2021-Dec-14 at 19:01

            I reverted to a previous commit and re-applied the updates while ensuring it still built between each update. Didn't see the error again.

            Source https://stackoverflow.com/questions/69977766

            QUESTION

            Azure Application Insight JavaScript SDK trackEvent Timestamp
            Asked 2021-Oct-20 at 08:30

            I am using Azure Applicaiton Insight SDK https://github.com/Microsoft/ApplicationInsights-JS to send telemetry to Azure Application from my application.

            I am using the appInsights.trackEvent. My question is what is the timestamp of the Event? Is it the time

            • when my app calls the appInsights.trackEvent? Or
            • when the app calls the flushEvent?
            • when the Events get to the Application Insight Server?

            Thank you.

            ...

            ANSWER

            Answered 2021-Oct-20 at 08:30

            Along with trackEvent, we have trackDependencyData which is the IDependencyTelemetry interface, here we have startTime as a parameter to know the event start time of telemetry.

            StartTime is Dependency start timestamp.

            We have below function if we are sending telemetry from our app:

            Source https://stackoverflow.com/questions/69636150

            QUESTION

            Application Insights starttrackevent stopstrackevent across pages in a single session
            Asked 2021-Jun-15 at 22:35

            I am having trouble tracking down documentation on this, so hoping someone knows as I am not able to get application insights to capture telemetry on starttrackevent and stopstrackevent across pages. This is an asp.net mvc application, so SPA is not in play here.

            I am worried I may be doing something incorrectly, however the likely case is it doesn't support it.

            Flow:

            • user hits site for the first time
            • user does action that triggers startTrackEvent("eventName");
            • user navigates to a new page
            • user does action that triggers stopTrackEvent("eventName");

            -- from the appInsights readme https://github.com/microsoft/ApplicationInsights-JS/blob/master/README.md

            appInsights.startTrackEvent("event");

            appInsights.stopTrackEvent("event", null, {customProp1: "some value"});

            ...

            ANSWER

            Answered 2021-Jun-15 at 22:35

            Not per documentation, but via testing, can confirm that when a new page loads, appInsights will not persist start/stoptrackevent.

            Source https://stackoverflow.com/questions/67929386

            QUESTION

            Connect web app to Visual Studio Application Insights
            Asked 2021-Jan-08 at 01:54

            I'm using Application Insights as part of my .Net Framework WebAPI project. When running the code locally (in debug mode), I can see all the events that would be sent to AI locally in Visual Studio by clicking the Application Insights button in the toolbar.

            I've also got a Angular web App which works in tandem with the .Net backend. I've got the web version of Application Insights setup on it which sends telemetry to an Azure AI instance. Is it possible to have the Angular web app send its telemetry to the local AI instance in Visual Studio when I'm running it locally?

            I'm using v2.5.10 of the @microsoft/applicationinsights-web library and Visual Studio Professional 2019 if that makes a difference.

            ...

            ANSWER

            Answered 2021-Jan-08 at 01:54

            Actually, there is no local AI instance. By default, the data you see in visual studio -> Application Insights Search window is from the current debug session, the screenshot is as below:

            Another thing is that if you specify a valid InstrumentationKey, the data are always sending to application insights in azure portal(unless you setup firewall rule to block them).

            For Angular web App, there is no way to just show the data in visual studio, but not sending to AI instance in azure.

            Here are some suggestions just for your reference, but they cannot totally meet your requirement:

            Solution 1: Sending data from Angular web App to AI instance in azure, then you can fetch these data from azure to visual studio locally. To do that, in the visual studio -> Application Insights Search window, change the Debug session telemetry to the AI instance in azure. Like below:

            Solution 2: If you just don't want to send the data to Azure, you can use an invalid InstrumentationKey, and then open tools like fiddler to see these telemetry data.

            Source https://stackoverflow.com/questions/65607054

            QUESTION

            Unexplained null and circular dependency in App Insights for Angular
            Asked 2020-Dec-04 at 09:22

            I am trying to experiment with Azure App Insights, following this tutorial. Unfortunately, I am totally new to Angular while experienced with the old Angularjs. The tutorial seems enough old-dated, I am working with Angular 10.

            The concept is that in order to log errors (and possibly other analytics events) in an Angular application we can leverage the Azure Insights SDK

            The tutorial creates a very-well-engineered service, that they called MyMonitoringService and I took freedom to rename AnalyticsService. So I just copied the fragment from the tutorial and renamed the class (saving as analytics.service.ts). I also had to import Injectable otherwise VS Code will report me an error.

            I also created the same (!) ErrorHandlerService (error.handler.service.ts). Exclamation mark because I first extended Angular's ErrorHandler, then tried to implement with same result

            ...

            ANSWER

            Answered 2020-Dec-04 at 09:22

            I think that you are not providing your AnalyticsService anywhere, at least I didn't find it in the code that you presented. Either add it to the module that is going to use it, or

            Source https://stackoverflow.com/questions/65130103

            QUESTION

            Reactjs npm test: Jest encountered an unexpected token
            Asked 2020-Nov-16 at 07:45

            I'm getting an error when running npm test. I feel like I have tried every existing suggestion online, but I can not get it to work.

            Here is my package.json. I thought the "transformIgnorePatterns": [ "/node_modules/(?!@total/*)", ], would solve the issue, but it didn't.

            ...

            ANSWER

            Answered 2020-Nov-13 at 16:08

            Looks like your situation is to be nested twice node_modules (node_modules/@opt-ui/icons/node_modules/@equinor/eds-icons), so you might have to set both @opt-ui and @equinor to re-transpile.

            However, I have an idea which I'm not 100% the following way would work but it's worth trying though:

            Source https://stackoverflow.com/questions/64821409

            QUESTION

            Send custom complex properties to Telemetry to Azure Portal with App Insights TrackEvent in Javascript?
            Asked 2020-Apr-09 at 14:13

            How can I send custom complex non-string properties to Telemetry to Azure Portal with App Insights TrackEvent in basic Javascript (not NodeJS)?

            I initialized the Application Insights JavaScript SDK through the following setup snippet:

            ...

            ANSWER

            Answered 2020-Apr-09 at 14:13

            The problem is with the SDK version.

            In Azure portal and in tags property from browser AJAX calls it shows that i'm using the 1.0.21 SDK version, and those examples are for 2.5.3 SDK version, which are not backward compatible.

            The solution was to upgrade to the latest SDK version by replacing the snippet setup (the main difference would be in changing url az416426.vo.msecnd.net/scripts/a/ai.0.js with this one az416426.vo.msecnd.net/scripts/b/ai.2.min.js).

            The new Snippet Setup:

            Source https://stackoverflow.com/questions/60959882

            QUESTION

            How do you add custom properties for ALL Azure Application Insight requests (JavaScript)
            Asked 2020-Mar-31 at 02:06
            • Given a browser Single Page Application
            • When using AppInsights JS SDK v2.5.3
            • Then I want a CustomServiceName to be sent with ALL requests.

            a) Should the custom properties be on the envelope.data, env.data.baseData or envelope.data.properties ?

            It appears to change depending on the type of call made.

            b) Can I set the CustomServiceName on the operation context instead of EVERY request instead?

            Currently we are using this

            ...

            ANSWER

            Answered 2020-Mar-31 at 02:06

            a) envelope.data is the base of the model and setting new properties directly on this object may not be ingested properly, and env.data.baseData will vary depending on the type of data you send. envelope.data.properties should exist on all telemetry types and allows you to send whatever custom data along with your telemetry you wish. envelope.data.properties["CustomServiceName"] = "MyName"; is the correct implementation.

            b) Using a telemetry initializer is the best way to achieve this- adding a property to each request is one of the use cases for them. The context has a small number of specific data points, and the list isn't customizable. Depending on the rest of your setup, Cloud Role may fit, but you will still need to use a telemetry initializer to set it.

            Source https://stackoverflow.com/questions/60875061

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ApplicationInsights-JS

            There are 2 ways to do this.
            Create an Application Insights resource in Azure by following these instructions.
            Grab the Instrumentation Key (aka "ikey") from the resource you created in step 1. Later, you'll add it to the instrumentationKey setting of the Application Insights JavaScript SDK.
            Add Application Insights to your app. There are 2 ways to do this. Install via NPM. Then, set up an instance of Application Insights in your app. Note: Typings are included with this package, so you do not need to install a separate typings package. npm i --save @microsoft/applicationinsights-web Pasting a script snippet at the beginning of every <head> tag for each page you want to monitor.
            If your app does not use NPM, you can directly instrument your webpages with Application Insights by pasting this snippet at the top of each your pages. Preferably, it should be the first script in your <head> section so that it can monitor any potential issues with all of your dependencies. :bulb: Note For readability and to reduce possible JavaScript errors, all of the possible configuration options are listed on a new line in snippet code above, if you don't want to change the value of a commented line it can be removed.
            Under-reporting of how users are using (or trying to use) your site;
            Missing telemetry on how your end users are using your site;
            Missing JavaScript errors that could potentially be blocking your end users from successfully using your site.
            For either the NPM or Snippet setup, you can also configure your instance of Application Insights using a Connection String. Simply replace the instrumentationKey field with the connectionString field.
            All autocollection is ON by default. The full version of the Application Insights Javascript SDK auto collects:.
            Uncaught exceptions in your app, including information on Stack trace Exception details and message accompanying the error Line & column number of error URL where error was raised
            Network Dependency Requests made by your app XHR and Fetch (fetch collection is disabled by default) requests, include information on Url of dependency source Command & Method used to request the dependency Duration of the request Result code and success status of the request ID (if any) of user making the request Correlation context (if any) where request is made
            User information (e.g. Location, network, IP)
            Device information (e.g. Browser, OS, version, language, model)
            Session information
            The SDK supports the ability to include multiple extensions at runtime. In order to create a new extension, please implement the following interface:. On initialization, config.extensions accepts an array of ITelemetryPlugin objects. These are hooked up and ITelemetryPlugin.processTelemetry() is chained based on priority of these plugins. Please note that higher the priority, the later your processing code will be invoked. The SDK supports a plugin model and channels can also be plugged in similarly (advanced scenario). Target scenarios for creating a brand new extension is to share a usage scenario that benefits multiple customers. Please follow guidelines.
            Regular extension priority can be between 201 to 499.
            Priorty range < 201 is reserved.
            Priority range > 1000 is for channels (advanced scenario)
            ITelemetryPlugin.setNextPlugin() implementation to continuing supporting existing (non-shared) execution of plugins, however, new plugins should use the new IProcessTelemetryContext.processNext() moving forward as this support the creation of shared (singleton) plugins;
            New ITelemetryPlugin.isInitialized() implementation
            And several helper methods. processNext(), - to call the next plugin using the context or the _nextPlugin value diagLog(): - to access the current IDiagnosticLogger instance. If you are creating new extensions it is recommended that you extend from this base class so that your extension will automatically inherit any future enhancements that are added to the ITelemetryPlugin interface without it requiring updates.
            Navigate to the root folder and update rush dependencies.
            Install all dependencies npm install npm install -g @microsoft/rush
            Navigate to the root folder and update rush dependencies rush update
            Build and test rush build npm run test
            Note: With the recent update to the latest version of rush npm run build fails with exit code 1 on successful build, hence the addition of --silent to the npm run build command.

            Support

            As part of changes being introduced in version 2.6.0 we are deprecating and removing the internal usages of the static helper classes CoreUtils, EventHelper, Util, UrlHelper, DateTimeUtils and ConnectionStringParser to provide better support for tree-shaking algorithms so that unused code can be safely dropped when using NPM packages.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/microsoft/ApplicationInsights-JS.git

          • CLI

            gh repo clone microsoft/ApplicationInsights-JS

          • sshUrl

            git@github.com:microsoft/ApplicationInsights-JS.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Monitoring Libraries

            netdata

            by netdata

            sentry

            by getsentry

            skywalking

            by apache

            osquery

            by osquery

            cat

            by dianping

            Try Top Libraries by microsoft

            vscode

            by microsoftTypeScript

            PowerToys

            by microsoftC#

            TypeScript

            by microsoftTypeScript

            terminal

            by microsoftC++

            Web-Dev-For-Beginners

            by microsoftJavaScript