當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript applicationinsights-js.AppInsights類代碼示例

本文整理匯總了TypeScript中applicationinsights-js.AppInsights的典型用法代碼示例。如果您正苦於以下問題:TypeScript AppInsights類的具體用法?TypeScript AppInsights怎麽用?TypeScript AppInsights使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了AppInsights類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: trackException

    trackException(
        exception: Error,
        handledAt: string,
        properties?: { [name: string]: string },
        measurements?: { [name: string]: number }) {

        AppInsights.trackException(exception, handledAt, properties, measurements);
    }
開發者ID:jbload,項目名稱:Muscularity,代碼行數:8,代碼來源:instrumentation.service.ts

示例2: trackPageViewEnd

    trackPageViewEnd(
        name: string,
        url: string,
        properties?: { [name: string]: string },
        measurements?: { [name: string]: number }) {

        AppInsights.stopTrackPage(name, url, properties, measurements);
    }
開發者ID:jbload,項目名稱:Muscularity,代碼行數:8,代碼來源:instrumentation.service.ts

示例3: trackPageView

    trackPageView(
        name: string,
        url: string,
        properties?: { [name: string]: string },
        measurements?: { [name: string]: number },
        pageViewDuration?: number) {

        AppInsights.trackPageView(name, url, properties, measurements, pageViewDuration);
    }
開發者ID:jbload,項目名稱:Muscularity,代碼行數:9,代碼來源:instrumentation.service.ts

示例4: trackDependencyCall

    trackDependencyCall(
        method: string,
        absoluteUrl: string,
        pathName: string,
        totalTime: number,
        success: boolean,
        resultCode: number) {

        AppInsights.trackDependency(this.newId(), method, absoluteUrl, pathName, totalTime, success, resultCode);
    }
開發者ID:jbload,項目名稱:Muscularity,代碼行數:10,代碼來源:instrumentation.service.ts

示例5: log

    public log(entry: LogEntry): void {

        switch (entry.level) {

            case LogLevel.Error:
                AppInsights.trackException(new Error(entry.message), null, { Severity: "Error" });
                break;

            case LogLevel.Warning:
                AppInsights.trackException(new Error(entry.message), null, { Severity: "Warning" });
                break;

            case LogLevel.Info:
                AppInsights.trackException(new Error(entry.message), null, { Severity: "Info" });
                break;

            default:
                AppInsights.trackException(new Error(entry.message), null, { Severity: "None" });
                break;
        }
    }
開發者ID:AKrasheninnikov,項目名稱:PnP,代碼行數:21,代碼來源:AzureApplicationInsightsListener.ts

示例6: enableProdMode

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppInsights } from 'applicationinsights-js';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

declare var window: any;

if(window.muscularityConfig && window.muscularityConfig.instrumentationKey) {
    AppInsights.downloadAndSetup({ instrumentationKey: window.muscularityConfig.instrumentationKey });
}


if (environment.production) {
    enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
    .catch(err => console.log(err));
開發者ID:jbload,項目名稱:Muscularity,代碼行數:20,代碼來源:main.ts

示例7: trackEvent

 trackEvent(name: string, properties?: { [name: string]: string }, measurements?: { [name: string]: number }) {
     AppInsights.trackEvent(name, properties, measurements);
 }
開發者ID:jbload,項目名稱:Muscularity,代碼行數:3,代碼來源:instrumentation.service.ts

示例8: trackPageViewStart

 trackPageViewStart(name: string) {
     AppInsights.startTrackPage(name);
 }
開發者ID:jbload,項目名稱:Muscularity,代碼行數:3,代碼來源:instrumentation.service.ts


注:本文中的applicationinsights-js.AppInsights類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。