Adding telemetry to ads OE filter (#23089)

* Adding telemetry to ads oe filter

* Fixing prop names

* fixing prop name

* Fixing localized strings

* Update src/sql/azdata.proposed.d.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/sql/workbench/contrib/objectExplorer/browser/serverTreeView.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Aasim Khan
2023-05-11 13:27:34 -07:00
committed by GitHub
parent c7d62e31fb
commit a4077c3d89
5 changed files with 30 additions and 4 deletions

View File

@@ -21,6 +21,8 @@ import { ILogService } from 'vs/platform/log/common/log';
import { AsyncServerTree, ServerTreeElement } from 'sql/workbench/services/objectExplorer/browser/asyncServerTree';
import { SqlIconId } from 'sql/base/common/codicons';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
export interface IServerView {
showFilteredTree(filter: string): void;
@@ -338,7 +340,8 @@ export class RemoveFilterAction extends Action {
private _node: TreeNode,
private _tree: AsyncServerTree | ITree,
private _profile: ConnectionProfile | undefined,
@IObjectExplorerService private _objectExplorerService: IObjectExplorerService
@IObjectExplorerService private _objectExplorerService: IObjectExplorerService,
@IAdsTelemetryService private _telemetryService: IAdsTelemetryService
) {
super(id, label);
}
@@ -362,5 +365,11 @@ export class RemoveFilterAction extends Action {
await this._tree.refresh(nodeToRefresh);
await this._tree.expand(nodeToRefresh);
}
this._telemetryService.createActionEvent(
TelemetryKeys.TelemetryView.ObjectExplorer,
TelemetryKeys.TelemetryAction.ObjectExplorerRemoveFilter
).withAdditionalProperties({
objectType: node.objectType
}).send();
}
}