vue-app-insights

1.0.8 • Public • Published

vue-app-insights

Installation

$ npm install vue-app-insights --save

Get started

Use app-insights without router

import Vue from "vue";
import VueAppInsights from "vue-app-insights";
 
Vue.use(VueAppInsights, {
  id: "XXXXXXXX--XXXX-XXXX-XXXXXXXXXXXX"
});

Use app-insights with router

import Vue from "vue";
import router from "./router";
 
import VueAppInsights from "vue-app-insights";
 
Vue.use(VueAppInsights, {
  id: "XXXXXXXX--XXXX-XXXX-XXXXXXXXXXXX",
  router
});

Use app-insights to track custom events

this.$appInsights.trackEvent(name: string, properties?: {[string]:string}, measurements?: {[string]:number})

Use app-insights to track exception

this.$appInsights.trackException(exception: Error, handledAt?: string, properties?: {[string]:string}, measurements?: {[string]:number}, severityLevel?: AI.SeverityLevel)

Use app-insights to track metrics

this.$appInsights.trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: {[string]:string})

Use app-insights to track trace

this.$appInsights.trackTrace(message: string, properties?: {[string]:string}, severityLevel?: AI.SeverityLevel)

Use app-insights to track dependancy

this.$appInsights.trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number) {

Use app-insights to add custom properties

import Vue from "vue";
import router from "./router";
 
import VueAppInsights from "vue-app-insights";
 
Vue.use(VueAppInsights, {
  id: "XXXXXXXX--XXXX-XXXX-XXXXXXXXXXXX",
  router,
  property: { "custom property": "custom value" }
});

Use app-insights to add configuration

import Vue from "vue";
import router from "./router";
 
import VueAppInsights from "vue-app-insights";
 
Vue.use(VueAppInsights, {
  id: "XXXXXXXX--XXXX-XXXX-XXXXXXXXXXXX",
  router,
  property: { "custom property": "custom value" },
  IConfig: {
    disableTelemetry: false,
    disableAjaxTracking: true
  }
});

Package Sidebar

Install

npm i vue-app-insights

Weekly Downloads

47

Version

1.0.8

License

MIT

Unpacked Size

4.6 kB

Total Files

4

Last publish

Collaborators

  • arunkumar-23
  • creativetechos