Add subscriptionId and authType to telemetry (#140)

This commit is contained in:
Steve Faulkner 2020-08-10 18:43:45 -05:00 committed by GitHub
parent abce15a6b2
commit 3051961093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 82 additions and 78 deletions

View File

@ -3,6 +3,7 @@ import { sendMessage } from "../../Common/MessageHandler";
import { MessageTypes } from "../../Contracts/ExplorerContracts";
import { appInsights } from "../appInsights";
import { configContext } from "../../ConfigContext";
import { userContext } from "../../UserContext";
/**
* Class that persists telemetry data to the portal tables.
@ -115,6 +116,9 @@ export default class TelemetryProcessor {
private static getData(data?: any): any {
return {
// TODO: Need to `any` here since the window imports Explorer which can't be in strict mode yet
authType: (window as any).authType,
subscriptionId: userContext.subscriptionId,
platform: configContext.platform,
...(data ? data : [])
};