How to use the @microsoft/applicationinsights-web.ApplicationInsights function in @microsoft/applicationinsights-web

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 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 2 months ago

Package Health Score

92 / 100
Full package analysis

Similar packages