-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update VS telemetry for devkit #72894
Conversation
@@ -20,6 +20,9 @@ private async Task<ITelemetryReporter> CreateReporterAsync() | |||
{ | |||
var exportProvider = await LanguageServerTestComposition.CreateExportProviderAsync(TestOutputLogger.Factory, includeDevKitComponents: true, out var _); | |||
|
|||
// VS Telemetry requires this environment variable to be set. | |||
Environment.SetEnvironmentVariable("CommonPropertyBagPath", Path.GetTempFileName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment.SetEnvironmentVariable("CommonPropertyBagPath", Path.GetTempFileName());
We don't have to do this in product code?
I see where the vstelemetryapi code uses this value (unfortunate they don't expose a constant for the name), do we actually use the file anywhere?
Would it make sense for them not to fail if they can't find the env variable, but to instead just set it to Path.GetTempFileName() instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have to do this in product code?
We do do this in product code (it happens inside the call here - https://github.com/dotnet/vscode-csharp/blob/dd7c7f297ae76babedc3c036e6face93ed960f54/src/lsptoolshost/roslynLanguageServer.ts#L847)
cc @jonathanjyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ToddGrun, that file is used to pass specific values from VS Code (Extension version, telemetry level, etc) over to the TelemetryAPI that we don't want to pass on the command line (because we're trying to limit doing that). If that file is not found, then telemetry does error out on the managed side. There's not really anything in that file that other teams would need that you can't get out of TelemetrySession, but if you want to do something with it send me a ping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, makes sense. Thanks!
Required in order to capture dumps for NFW issues in devkit.