Add second App Insights instance (#609)

This commit is contained in:
Steve Faulkner
2021-04-05 18:03:17 -05:00
committed by GitHub
parent 250faa5206
commit ba3f4829fa
7 changed files with 200 additions and 93 deletions

View File

@@ -1,7 +1,7 @@
import { sendMessage } from "./MessageHandler";
import { Diagnostics, MessageTypes } from "../Contracts/ExplorerContracts";
import { appInsights } from "../Shared/appInsights";
import { SeverityLevel } from "@microsoft/applicationinsights-web";
import { Diagnostics, MessageTypes } from "../Contracts/ExplorerContracts";
import { trackTrace } from "../Shared/appInsights";
import { sendMessage } from "./MessageHandler";
// TODO: Move to a separate Diagnostics folder
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -46,7 +46,7 @@ function _logEntry(entry: Diagnostics.LogEntry): void {
return SeverityLevel.Information;
}
})(entry.level);
appInsights.trackTrace({ message: entry.message, severityLevel }, { area: entry.area });
trackTrace({ message: entry.message, severityLevel }, { area: entry.area });
}
function _generateLogEntry(