mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-29 08:56:52 +00:00
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 { IChoiceGroupProps } from "office-ui-fabric-react";
|
||||||
import { getErrorMessage, handleError, getErrorStack } from "../Common/ErrorHandlingUtils";
|
import { getErrorMessage, handleError, getErrorStack } from "../Common/ErrorHandlingUtils";
|
||||||
import { SubscriptionType } from "../Contracts/SubscriptionType";
|
import { SubscriptionType } from "../Contracts/SubscriptionType";
|
||||||
|
import { appInsights } from "../Shared/appInsights";
|
||||||
import { SelfServeLoadingComponentAdapter } from "../SelfServe/SelfServeLoadingComponentAdapter";
|
import { SelfServeLoadingComponentAdapter } from "../SelfServe/SelfServeLoadingComponentAdapter";
|
||||||
import { SelfServeType } from "../SelfServe/SelfServeUtils";
|
import { SelfServeType } from "../SelfServe/SelfServeUtils";
|
||||||
import { SelfServeComponentAdapter } from "../SelfServe/SelfServeComponentAdapter";
|
import { SelfServeComponentAdapter } from "../SelfServe/SelfServeComponentAdapter";
|
||||||
@ -361,6 +362,15 @@ export default class Explorer {
|
|||||||
this.isFeatureEnabled(Constants.Features.enableSpark)
|
this.isFeatureEnabled(Constants.Features.enableSpark)
|
||||||
);
|
);
|
||||||
if (this.isSparkEnabled()) {
|
if (this.isSparkEnabled()) {
|
||||||
|
appInsights.trackEvent(
|
||||||
|
{ name: "LoadedWithSparkEnabled" },
|
||||||
|
{
|
||||||
|
subscriptionId: userContext.subscriptionId,
|
||||||
|
accountName: userContext.databaseAccount?.name,
|
||||||
|
accountId: userContext.databaseAccount?.id,
|
||||||
|
platform: configContext.platform,
|
||||||
|
}
|
||||||
|
);
|
||||||
const pollArcadiaTokenRefresh = async () => {
|
const pollArcadiaTokenRefresh = async () => {
|
||||||
this.arcadiaToken(await this.getArcadiaToken());
|
this.arcadiaToken(await this.getArcadiaToken());
|
||||||
setTimeout(() => pollArcadiaTokenRefresh(), this.getTokenRefreshInterval(this.arcadiaToken()));
|
setTimeout(() => pollArcadiaTokenRefresh(), this.getTokenRefreshInterval(this.arcadiaToken()));
|
||||||
|
@ -31,6 +31,8 @@ import Explorer from "../Explorer";
|
|||||||
import { NotebookContentItem } from "../Notebook/NotebookContentItem";
|
import { NotebookContentItem } from "../Notebook/NotebookContentItem";
|
||||||
import { CommandButtonComponentProps } from "../Controls/CommandButton/CommandButtonComponent";
|
import { CommandButtonComponentProps } from "../Controls/CommandButton/CommandButtonComponent";
|
||||||
import { toJS, stringifyNotebook } from "@nteract/commutable";
|
import { toJS, stringifyNotebook } from "@nteract/commutable";
|
||||||
|
import { appInsights } from "../../Shared/appInsights";
|
||||||
|
import { userContext } from "../../UserContext";
|
||||||
|
|
||||||
export interface NotebookTabOptions extends ViewModels.TabOptions {
|
export interface NotebookTabOptions extends ViewModels.TabOptions {
|
||||||
account: DataModels.DatabaseAccount;
|
account: DataModels.DatabaseAccount;
|
||||||
@ -426,6 +428,15 @@ export default class NotebookTabV2 extends TabsBase {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appInsights.trackEvent(
|
||||||
|
{ name: "SparkPoolSelected" },
|
||||||
|
{
|
||||||
|
subscriptionId: userContext.subscriptionId,
|
||||||
|
accountName: userContext.databaseAccount?.name,
|
||||||
|
accountId: userContext.databaseAccount?.id,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
this.container &&
|
this.container &&
|
||||||
this.container.arcadiaWorkspaces &&
|
this.container.arcadiaWorkspaces &&
|
||||||
this.container.arcadiaWorkspaces() &&
|
this.container.arcadiaWorkspaces() &&
|
||||||
|
Loading…
Reference in New Issue
Block a user