Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add telemetry reporting on VS analysis engine usage #1382

Merged
merged 37 commits into from
Apr 13, 2018
Merged

Add telemetry reporting on VS analysis engine usage #1382

merged 37 commits into from
Apr 13, 2018

Conversation

MikhailArkhipov
Copy link

Fixes #1016

This pull request:

  • Has a title summarizes what is changing
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)

@codecov
Copy link

codecov bot commented Apr 12, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@cbe48a5). Click here to learn what that means.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1382   +/-   ##
=========================================
  Coverage          ?   71.06%           
=========================================
  Files             ?      269           
  Lines             ?    12430           
  Branches          ?     2199           
=========================================
  Hits              ?     8833           
  Misses            ?     3464           
  Partials          ?      133
Impacted Files Coverage Δ
src/client/telemetry/constants.ts 100% <100%> (ø)
src/client/activation/analysis.ts 15.83% <18.18%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cbe48a5...d4afb6c. Read the comment docs.

@@ -80,6 +90,7 @@ export class AnalysisExtensionActivator implements IExtensionActivator {
} catch (ex) {
if (await this.isDotNetInstalled()) {
this.appShell.showErrorMessage(`.NET Runtime appears to be installed but the language server did not start. Error ${ex}`);
reporter.sendTelemetryEvent(PYTHON_ANALYSIS_ENGINE_ERROR, { error: 'Failed to start (MSIL)' });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -108,6 +121,7 @@ export class AnalysisExtensionActivator implements IExtensionActivator {
let disposable: Disposable | undefined;
const deferred = createDeferred<void>();
try {
const sw = new StopWatch();
lc.clientOptions.errorHandler = new LanguageServerStartupErrorHandler(deferred);

disposable = lc.start();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

            disposable = lc.start();
            lc.onReady()
                .then(() => deferred.resolve())
                .catch(ex => deferred.reject());
await deferred.promise;

You might want to change to .catch(deferred.reject);
This way the error is rethrown.

@MikhailArkhipov MikhailArkhipov merged commit 472ae49 into microsoft:master Apr 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capture telemetry from language server using PTVS
3 participants