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

Update VS telemetry for devkit #72894

Merged
merged 3 commits into from
Apr 8, 2024
Merged

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Apr 5, 2024

Required in order to capture dumps for NFW issues in devkit.

@dibarbet dibarbet requested a review from a team as a code owner April 5, 2024 20:07
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 5, 2024
@dibarbet dibarbet requested a review from a team as a code owner April 8, 2024 20:42
@@ -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());
Copy link
Contributor

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?

Copy link
Member Author

@dibarbet dibarbet Apr 8, 2024

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

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, makes sense. Thanks!

@dibarbet dibarbet merged commit b46c4ff into dotnet:main Apr 8, 2024
30 checks passed
@dibarbet dibarbet deleted the update_vs_telemetry branch April 8, 2024 23:37
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 8, 2024
@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants