diff --git a/server/src/dbt_execution/DbtCli.ts b/server/src/dbt_execution/DbtCli.ts index 45ff2cb4..de0c8a12 100644 --- a/server/src/dbt_execution/DbtCli.ts +++ b/server/src/dbt_execution/DbtCli.ts @@ -54,10 +54,10 @@ export class DbtCli { if (dbtProfileType) { await this.suggestToInstallDbt(this.featureFinder.getPythonPath(), dbtProfileType); } else { - this.onDbtFindFailed(); + this.onDbtFindFailed(dbtProfileType); } } catch { - this.onDbtFindFailed(); + this.onDbtFindFailed(dbtProfileType); } } this.dbtReady = true; @@ -107,15 +107,20 @@ export class DbtCli { if (installResult.isOk()) { this.notificationSender.sendRestart(); } else { - this.finishWithError(installResult.error); + this.finishWithError(installResult.error, dbtProfileType); } } else { - this.onDbtFindFailed(); + this.onDbtFindFailed(dbtProfileType); } } - finishWithError(message: string): void { + finishWithError(message: string, dbtProfileType: string | undefined): void { this.modelProgressReporter.sendFinish(); + this.notificationSender.sendTelemetry('error', { + name: 'vscodeErrorMessage', + message: `${message}. Profile: ${dbtProfileType ?? 'undefined'}`, + stack: new Error('vscodeErrorMessage').stack ?? '', + }); this.connection.window.showErrorMessage(message); } @@ -127,7 +132,7 @@ export class DbtCli { return this.onDbtReadyEmitter.event; } - private onDbtFindFailed(): void { - this.finishWithError(this.getError()); + private onDbtFindFailed(dbtProfileType: string | undefined): void { + this.finishWithError(this.getError(), dbtProfileType); } } diff --git a/server/src/lsp_server/LspServer.ts b/server/src/lsp_server/LspServer.ts index b6c84599..5a2a14ef 100644 --- a/server/src/lsp_server/LspServer.ts +++ b/server/src/lsp_server/LspServer.ts @@ -315,7 +315,6 @@ export class LspServer extends LspServerBase { logStartupInfo(contextInfo: DbtProfileInfo, initTime: number, ubuntuInWslWorks: boolean): void { this.notificationSender.sendTelemetry('log', { dbtVersion: getStringVersion(this.featureFinder.versionInfo?.installedVersion), - pythonPath: this.featureFinder.pythonInfo.path, pythonVersion: this.featureFinder.pythonInfo.version?.join('.') ?? 'undefined', initTime: initTime.toString(), type: contextInfo.type ?? 'unknown type',