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 powershell version telemetry #1908

Merged
merged 5 commits into from
Apr 24, 2019

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Apr 19, 2019

PR Summary

Leveraging the vscode-extension-telemetry extension, this adds a single additional data point... "PowerShell version". This helps us answer the question:

"Who is using VSCode?
Is it Windows PowerShell, PowerShell Core?
Is anyone on v3/v4 using the stable version right now?"

This means we can better focus our efforts in developing and maintaining the PowerShell extension.

This node module honors the vscode mechanism for opting out of telemetry so we do not need to add any custom logic for that scenario.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

src/main.ts Outdated Show resolved Hide resolved
src/session.ts Outdated Show resolved Hide resolved
@TylerLeonhardt
Copy link
Member Author

Ok I've moved the location of the telemetry call to where @rkeithhill suggested. That's definitely the right place!

@TylerLeonhardt
Copy link
Member Author

The one thing I'm not too sure about is how to stop debug builds from sending telemetry. Maybe it's just such a small number that it doesn't matter?

Thoughts?

@rjmholt
Copy link
Contributor

rjmholt commented Apr 19, 2019

I think it's probably too insignificant to care about, but otherwise the server can use #if DEBUG to generate those (it's a built-in definition I think).

The problem is getting that information in the client, which I think could only be achieved by either querying (or being sent at startup) information from the server, or if the client itself is built with a debug flag.

It's probably too much work to be worth it at this stage, but would be worth adding with greater investment later.

@TylerLeonhardt
Copy link
Member Author

@rjmholt #if DEBUG in TypeScript?

@TylerLeonhardt TylerLeonhardt marked this pull request as ready for review April 20, 2019 00:01
@rkeithhill
Copy link
Contributor

Isn't there a VSCode API to see if you're running in the extension dev host?

@rjmholt
Copy link
Contributor

rjmholt commented Apr 21, 2019

@rjmholt #if DEBUG in TypeScript?

No, only server-side — in PSES

@TylerLeonhardt
Copy link
Member Author

@rkeithhill without doing something tricky like checking the file path, there doesn't seem to be a way to do that, unfortunately.

@rkeithhill
Copy link
Contributor

Could you check the app title bar to see if it contains "Extension Development Host"?

@TylerLeonhardt
Copy link
Member Author

Naturally David thought about this and a mechanism already existed :)

@rkeithhill
Copy link
Contributor

rkeithhill commented Apr 24, 2019

That VSCode issue is still open almost three years later. :-( You guys should vote it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants