added missing telemetry to the Table API usage attempts (#2441)
This commit is contained in:
Родитель
b1d47fbaed
Коммит
c626b1535c
|
@ -3,7 +3,13 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { GenericTreeItem, type AzExtTreeItem } from '@microsoft/vscode-azext-utils';
|
||||
import {
|
||||
callWithTelemetryAndErrorHandling,
|
||||
GenericTreeItem,
|
||||
type AzExtTreeItem,
|
||||
type IActionContext,
|
||||
} from '@microsoft/vscode-azext-utils';
|
||||
import { API } from '../../AzureDBExperiences';
|
||||
import { deleteCosmosDBAccount } from '../../commands/deleteDatabaseAccount/deleteCosmosDBAccount';
|
||||
import { type IDeleteWizardContext } from '../../commands/deleteDatabaseAccount/IDeleteWizardContext';
|
||||
import { DocDBAccountTreeItemBase } from '../../docdb/tree/DocDBAccountTreeItemBase';
|
||||
|
@ -21,12 +27,22 @@ export class TableAccountTreeItem extends DocDBAccountTreeItemBase {
|
|||
}
|
||||
|
||||
public async loadMoreChildrenImpl(_clearCache: boolean): Promise<AzExtTreeItem[]> {
|
||||
const tableNotFoundTreeItem: AzExtTreeItem = new GenericTreeItem(this, {
|
||||
contextValue: 'tableNotSupported',
|
||||
label: 'Table Accounts are not supported yet.',
|
||||
});
|
||||
tableNotFoundTreeItem.suppressMaskLabel = true;
|
||||
return [tableNotFoundTreeItem];
|
||||
const result = await callWithTelemetryAndErrorHandling(
|
||||
'getChildren',
|
||||
(context: IActionContext): AzExtTreeItem[] => {
|
||||
context.telemetry.properties.experience = API.Table;
|
||||
context.telemetry.properties.parentContext = this.contextValue;
|
||||
|
||||
const tableNotFoundTreeItem: AzExtTreeItem = new GenericTreeItem(this, {
|
||||
contextValue: 'tableNotSupported',
|
||||
label: 'Table Accounts are not supported yet.',
|
||||
});
|
||||
tableNotFoundTreeItem.suppressMaskLabel = true;
|
||||
return [tableNotFoundTreeItem];
|
||||
},
|
||||
);
|
||||
|
||||
return result ?? [];
|
||||
}
|
||||
|
||||
public async deleteTreeItemImpl(context: IDeleteWizardContext): Promise<void> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче