How to use the applicationinsights.Contracts function in applicationinsights

To help you get started, we’ve selected a few applicationinsights examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / BatchExplorer / src / client / core / telemetry / application-insights-uploader.ts View on Github external
public trackPageView(pageView: PageViewTelemetry) {
        const pageViewData = new appinsights.Contracts.PageViewData();
        pageViewData.name = pageView.name;
        pageViewData.ver = 1;

        const data = new appinsights.Contracts.Data();
        data.baseData = pageView;
        data.baseType = "PageViewData";

        const envelope = new appinsights.Contracts.Envelope();
        envelope.data = data;
        envelope.time = new Date().toISOString();
        envelope.ver = 1;
        envelope.iKey = this._client.config.instrumentationKey;
        envelope.name = "Microsoft.ApplicationInsights.PageView";
        envelope.tags = this._client.context.tags;
        this._client.channel.send(envelope);
    }
github Azure / BatchExplorer / src / client / core / telemetry / application-insights-uploader.ts View on Github external
public trackPageView(pageView: PageViewTelemetry) {
        const pageViewData = new appinsights.Contracts.PageViewData();
        pageViewData.name = pageView.name;
        pageViewData.ver = 1;

        const data = new appinsights.Contracts.Data();
        data.baseData = pageView;
        data.baseType = "PageViewData";

        const envelope = new appinsights.Contracts.Envelope();
        envelope.data = data;
        envelope.time = new Date().toISOString();
        envelope.ver = 1;
        envelope.iKey = this._client.config.instrumentationKey;
        envelope.name = "Microsoft.ApplicationInsights.PageView";
        envelope.tags = this._client.context.tags;
        this._client.channel.send(envelope);
    }