说明
typescript vscode-extension-telemetry-wrapper instrumentoperation示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。
编程语言: TypeScript
命名空间/包名称: vscode-extension-telemetry-wrapper
示例#1
文件:
command.ts
项目:
Manu-sh/dotfiles
export function instrumentCommand(context: vscode.ExtensionContext, operationName: string, callback: CommandHandler): (...args: any[]) => any {
const stub = async (operationId: string, ...args: any[]) => {
return await callback(context, operationId, ...args);
};
return instrumentOperation(operationName, stub);
}
示例#2
文件:
extension.ts
项目:
Manu-sh/dotfiles
export async function activate(context: vscode.ExtensionContext) {
initializeTelemetry(context);
await instrumentOperation('activation', initializeExtension)(context);
}