Skip to content

Commit 8478c02

Browse files
authored
bugfix: Add telemetry for the newly added commands (#221)
1 parent 072245d commit 8478c02

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/views/dependencyDataProvider.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
2929
constructor(public readonly context: ExtensionContext) {
3030
context.subscriptions.push(commands.registerCommand(Commands.VIEW_PACKAGE_REFRESH, (debounce?: boolean) => this.refreshWithLog(debounce)));
3131
context.subscriptions.push(commands.registerCommand(Commands.VIEW_PACKAGE_REVEAL_FILE_OS,
32-
(node: INodeData) => commands.executeCommand("revealFileInOS", Uri.parse(node.uri))));
32+
instrumentOperation(Commands.VIEW_PACKAGE_REVEAL_FILE_OS, (_operationId, node: INodeData) =>
33+
commands.executeCommand("revealFileInOS", Uri.parse(node.uri)))));
3334
context.subscriptions.push(commands.registerCommand(Commands.VIEW_PACKAGE_COPY_FILE_PATH,
34-
(node: INodeData) => commands.executeCommand("copyFilePath", Uri.parse(node.uri))));
35+
instrumentOperation(Commands.VIEW_PACKAGE_COPY_FILE_PATH, (_operationId, node: INodeData) =>
36+
commands.executeCommand("copyFilePath", Uri.parse(node.uri)))));
3537
context.subscriptions.push(commands.registerCommand(Commands.VIEW_PACKAGE_COPY_RELATIVE_FILE_PATH,
36-
(node: INodeData) => commands.executeCommand("copyRelativeFilePath", Uri.parse(node.uri))));
38+
instrumentOperation(Commands.VIEW_PACKAGE_COPY_RELATIVE_FILE_PATH, (_operationId, node: INodeData) =>
39+
commands.executeCommand("copyRelativeFilePath", Uri.parse(node.uri)))));
3740
context.subscriptions.push(commands.registerCommand(Commands.VIEW_PACKAGE_OPEN_FILE,
3841
instrumentOperation(Commands.VIEW_PACKAGE_OPEN_FILE, (_operationId, uri) => this.openFile(uri))));
3942
context.subscriptions.push(commands.registerCommand(Commands.VIEW_PACKAGE_OUTLINE,

0 commit comments

Comments
 (0)