Add telemetry to Spark+Synapse Pools (#392)
This commit is contained in:
parent
4be53284b5
commit
b3cafe3468
|
@ -88,6 +88,7 @@ import { stringToBlob } from "../Utils/BlobUtils";
|
|||
import { IChoiceGroupProps } from "office-ui-fabric-react";
|
||||
import { getErrorMessage, handleError, getErrorStack } from "../Common/ErrorHandlingUtils";
|
||||
import { SubscriptionType } from "../Contracts/SubscriptionType";
|
||||
import { appInsights } from "../Shared/appInsights";
|
||||
import { SelfServeLoadingComponentAdapter } from "../SelfServe/SelfServeLoadingComponentAdapter";
|
||||
import { SelfServeType } from "../SelfServe/SelfServeUtils";
|
||||
import { SelfServeComponentAdapter } from "../SelfServe/SelfServeComponentAdapter";
|
||||
|
@ -361,6 +362,15 @@ export default class Explorer {
|
|||
this.isFeatureEnabled(Constants.Features.enableSpark)
|
||||
);
|
||||
if (this.isSparkEnabled()) {
|
||||
appInsights.trackEvent(
|
||||
{ name: "LoadedWithSparkEnabled" },
|
||||
{
|
||||
subscriptionId: userContext.subscriptionId,
|
||||
accountName: userContext.databaseAccount?.name,
|
||||
accountId: userContext.databaseAccount?.id,
|
||||
platform: configContext.platform,
|
||||
}
|
||||
);
|
||||
const pollArcadiaTokenRefresh = async () => {
|
||||
this.arcadiaToken(await this.getArcadiaToken());
|
||||
setTimeout(() => pollArcadiaTokenRefresh(), this.getTokenRefreshInterval(this.arcadiaToken()));
|
||||
|
|
|
@ -31,6 +31,8 @@ import Explorer from "../Explorer";
|
|||
import { NotebookContentItem } from "../Notebook/NotebookContentItem";
|
||||
import { CommandButtonComponentProps } from "../Controls/CommandButton/CommandButtonComponent";
|
||||
import { toJS, stringifyNotebook } from "@nteract/commutable";
|
||||
import { appInsights } from "../../Shared/appInsights";
|
||||
import { userContext } from "../../UserContext";
|
||||
|
||||
export interface NotebookTabOptions extends ViewModels.TabOptions {
|
||||
account: DataModels.DatabaseAccount;
|
||||
|
@ -426,6 +428,15 @@ export default class NotebookTabV2 extends TabsBase {
|
|||
return;
|
||||
}
|
||||
|
||||
appInsights.trackEvent(
|
||||
{ name: "SparkPoolSelected" },
|
||||
{
|
||||
subscriptionId: userContext.subscriptionId,
|
||||
accountName: userContext.databaseAccount?.name,
|
||||
accountId: userContext.databaseAccount?.id,
|
||||
}
|
||||
);
|
||||
|
||||
this.container &&
|
||||
this.container.arcadiaWorkspaces &&
|
||||
this.container.arcadiaWorkspaces() &&
|
||||
|
|
Loading…
Reference in New Issue