mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Don't log internal command executions from ext host (#17482)
This commit is contained in:
@@ -34,7 +34,7 @@ export class SqlTelemetryContribution extends Disposable implements IWorkbenchCo
|
|||||||
'selectNextSuggestion'].some(id => id === e.commandId) &&
|
'selectNextSuggestion'].some(id => id === e.commandId) &&
|
||||||
// Events from src\vs\editor\contrib\wordOperations\wordOperations.ts
|
// Events from src\vs\editor\contrib\wordOperations\wordOperations.ts
|
||||||
!e.commandId.startsWith('cursor') &&
|
!e.commandId.startsWith('cursor') &&
|
||||||
!e.commandId.startsWith('_vscode_delegate')) {
|
!e.commandId.startsWith('_')) { // Commands starting with _ are internal commands which generally aren't useful to us currently
|
||||||
// Note - this event is duplicated in extHostCommands to also ensure logging of all commands contributed by extensions
|
// Note - this event is duplicated in extHostCommands to also ensure logging of all commands contributed by extensions
|
||||||
telemetryService.sendActionEvent(TelemetryView.Shell, TelemetryAction.adsCommandExecuted, e.commandId);
|
telemetryService.sendActionEvent(TelemetryView.Shell, TelemetryAction.adsCommandExecuted, e.commandId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,12 @@ export class ExtHostCommands implements ExtHostCommandsShape {
|
|||||||
private async _doExecuteCommand<T>(id: string, args: any[], retry: boolean): Promise<T> {
|
private async _doExecuteCommand<T>(id: string, args: any[], retry: boolean): Promise<T> {
|
||||||
|
|
||||||
if (this._commands.has(id)) {
|
if (this._commands.has(id)) {
|
||||||
this._mainThreadTelemetryProxy.$publicLog(TelemetryKeys.EventName.Action, { properties: { action: TelemetryKeys.TelemetryAction.adsCommandExecuted, view: TelemetryKeys.TelemetryView.ExtensionHost, target: id } }); // {{SQL CARBON EDIT}} Log ext-contributed commands. Only logging here to avoid double-logging for command executions coming from core (which are already logged)
|
// {{SQL CARBON EDIT}} Log ext-contributed commands (which never get send to the main thread if called from the ext host).
|
||||||
|
// Only logging here to avoid double-logging for command executions coming from core (which are already logged)
|
||||||
|
if (!id.startsWith('_')) { // Commands starting with _ are internal commands which generally aren't useful to us currently
|
||||||
|
this._mainThreadTelemetryProxy.$publicLog(TelemetryKeys.EventName.Action, { properties: { action: TelemetryKeys.TelemetryAction.adsCommandExecuted, view: TelemetryKeys.TelemetryView.ExtensionHost, target: id } });
|
||||||
|
}
|
||||||
|
|
||||||
// we stay inside the extension host and support
|
// we stay inside the extension host and support
|
||||||
// to pass any kind of parameters around
|
// to pass any kind of parameters around
|
||||||
return this._executeContributedCommand<T>(id, args);
|
return this._executeContributedCommand<T>(id, args);
|
||||||
|
|||||||
Reference in New Issue
Block a user