How to use @microsoft/applicationinsights-web - 4 common examples

To help you get started, we’ve selected a few @microsoft/applicationinsights-web 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 OfficeDev / microsoft-teams-apps-greatideas / Source / Microsoft.Teams.Apps.SubmitIdea / ClientApp / src / components / manage-category / manage-category.tsx View on Github external
async getCategory() {
        this.appInsights.trackTrace({ message: `'getCategory' - Initiated request`, properties: { User: this.userObjectId }, severityLevel: SeverityLevel.Information });
        let category = await getAllCategories();

        if (category.status === 200 && category.data) {
            this.appInsights.trackTrace({ message: `'getCategory' - Request success`, properties: { User: this.userObjectId }, severityLevel: SeverityLevel.Information });
            console.log(category);
            this.setState({
                categories: category.data,
                filteredCategory: category.data
            });
        }
        else {
            this.appInsights.trackTrace({ message: `'getCategory' - Request failed`, properties: { User: this.userObjectId }, severityLevel: SeverityLevel.Information });
        }
        this.setState({
            loader: false
        });
github OfficeDev / microsoft-teams-apps-greatideas / Source / Microsoft.Teams.Apps.SubmitIdea / ClientApp / src / components / manage-category / manage-category.tsx View on Github external
async getCategory() {
        this.appInsights.trackTrace({ message: `'getCategory' - Initiated request`, properties: { User: this.userObjectId }, severityLevel: SeverityLevel.Information });
        let category = await getAllCategories();

        if (category.status === 200 && category.data) {
            this.appInsights.trackTrace({ message: `'getCategory' - Request success`, properties: { User: this.userObjectId }, severityLevel: SeverityLevel.Information });
            console.log(category);
            this.setState({
                categories: category.data,
                filteredCategory: category.data
            });
        }
        else {
            this.appInsights.trackTrace({ message: `'getCategory' - Request failed`, properties: { User: this.userObjectId }, severityLevel: SeverityLevel.Information });
        }
        this.setState({
            loader: false
        });
    }
github IFRCGo / cbs / Source / Analytics / Web / src / components / NationalSocietyOverview.js View on Github external
import Typography from '@material-ui/core/Typography';
import GridListTile from '@material-ui/core/GridListTile';
import ListSubheader from '@material-ui/core/ListSubheader';
import {ApplicationInsights} from '@microsoft/applicationinsights-web';
import CaseReportByHealthRiskTable from "./healthRisk/CaseReportByHealthRiskTable";
import HealthRiskPerDistrictTable from "./healthRisk/HealthRiskPerDistrictTable";
import TotalCard from "./TotalCard";
import { getJson } from "../utils/request";
import { formatDate } from "../utils/dateUtils";
import HealthRiskPerDistrictBarCharts from "./healthRisk/HealthRiskPerDistrictBarCharts";
import Map from "./Map.js";
import CBSNavigation from './Navigation/CBSNavigation';
import { AllHealthRisks } from "../Features/HealthRisk/AllHealthRisks";
import { QueryCoordinator } from "@dolittle/queries";

const appInsights = new ApplicationInsights({
    config: {
        instrumentationKey: process.env.REACT_APP_APP_INSIGHTS_INSTRUMENTATION_KEY,
        maxBatchInterval: 0,
        disableFetchTracking: false
    }
});
appInsights.loadAppInsights();
export const BASE_URL = process.env.API_BASE_URL;


class NationalSocietyOverview extends Component {
    constructor(props) {
        super(props);

        this.state = {
            totalFemale: "-",
github episerver / EPiServer.Labs.BlockEnhancements / src / episerver-cms-telemetry / src / tracker.js View on Github external
initialize(config, customProperties, authenticatedUserId, accountId) {
        appInsights = new ApplicationInsights({ config });
        appInsights.loadAppInsights();
        appInsights.setAuthenticatedUserContext(authenticatedUserId, accountId);
        appInsights.addTelemetryInitializer((envelope) => {
            for (var key in customProperties) {
                envelope.data[key] = customProperties[key];
            }
        });
    },

@microsoft/applicationinsights-web

Microsoft Application Insights JavaScript SDK - Web

MIT
Latest version published 28 days ago

Package Health Score

92 / 100
Full package analysis

Similar packages