Skip to content

Commit

Permalink
Add improved masking
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 committed Sep 9, 2024
1 parent c248aed commit 3bc008e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/commands/createWebApp/createWebApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { AppInsightsCreateStep, AppInsightsListStep, AppKind, AppServicePlanCreateStep, AppServicePlanListStep, AppServicePlanSkuStep, CustomLocationListStep, LogAnalyticsCreateStep, ParsedSite, setLocationsTask, SiteNameStep } from "@microsoft/vscode-azext-azureappservice";
import { LocationListStep, ResourceGroupCreateStep, ResourceGroupListStep, SubscriptionTreeItemBase, VerifyProvidersStep } from "@microsoft/vscode-azext-azureutils";
import { AzureWizard, nonNullProp, parseError, type AzExtParentTreeItem, type AzureWizardExecuteStep, type AzureWizardPromptStep, type IActionContext, type ICreateChildImplContext } from "@microsoft/vscode-azext-utils";
import { AzureWizard, maskUserInfo, nonNullProp, parseError, type AzExtParentTreeItem, type AzureWizardExecuteStep, type AzureWizardPromptStep, type IActionContext, type ICreateChildImplContext } from "@microsoft/vscode-azext-utils";
import { webProvider } from "../../constants";
import { ext } from "../../extensionVariables";
import { localize } from "../../localize";
Expand Down Expand Up @@ -93,7 +93,7 @@ export async function createWebApp(context: IActionContext & Partial<ICreateChil
await newNode.enableLogs(context);
} catch (error) {
// optional part of creating web app, so not worth blocking on error
context.telemetry.properties.fileLoggingError = parseError(error).message;
context.telemetry.properties.fileLoggingError = maskUserInfo(parseError(error).message, []);
}

if (!suppressCreatedWebAppMessage) {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/createWebApp/stacks/getStackPicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { type ServiceClient } from '@azure/core-client';
import { createPipelineRequest } from '@azure/core-rest-pipeline';
import { createGenericClient, type AzExtPipelineResponse } from '@microsoft/vscode-azext-azureutils';
import { parseError, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils';
import { maskUserInfo, parseError, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils';
import { localize } from '../../../localize';
import { createRequestUrl } from '../../../utils/requestUtils';
import { getWorkspaceSetting } from '../../../vsCodeConfig/settings';
Expand Down Expand Up @@ -111,7 +111,7 @@ async function getStacks(context: IWebAppWizardContext & { _stacks?: WebAppStack
// Some environments (like Azure Germany/Mooncake) don't support the stacks ARM API yet
// And since the stacks don't change _that_ often, we'll just use a backup hard-coded value
stacksArmResponse = <StacksArmResponse>JSON.parse(backupStacks);
context.telemetry.properties.getStacksError = parseError(error).message;
context.telemetry.properties.getStacksError = maskUserInfo(parseError(error).message, []);
context.usingBackupStacks = true;
}

Expand Down

0 comments on commit 3bc008e

Please sign in to comment.