当前位置: 首页>>代码示例>>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;未经允许,请勿转载。