Skip to content

Commit 144da8b

Browse files
authored
Add new telemetry fields (#8673)
1 parent 7fa8fe5 commit 144da8b

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@
2121
* Bump tar-fs from 2.1.3 to 2.1.4 (PR: [#8661](https://github.com/dotnet/vscode-csharp/pull/8661))
2222
* Add copilot setup steps (PR: [#8655](https://github.com/dotnet/vscode-csharp/pull/8655))
2323
* Update pipeline and packaging excludes (PR: [#8654](https://github.com/dotnet/vscode-csharp/pull/8654))
24+
* Add new telemetry fields (PR: [#8673](https://github.com/dotnet/vscode-csharp/pull/8673))
25+
* Bump Roslyn to 5.1.0-1.25506.3 (PR: [#8673](https://github.com/dotnet/vscode-csharp/pull/8673))
26+
* Improve error recovery when object initializer uses ':' instead of '=' (PR: [#80553](https://github.com/dotnet/roslyn/pull/80553))
27+
* Support `field` keyword in EE. (PR: [#80515](https://github.com/dotnet/roslyn/pull/80515))
28+
* Log a debug message for ContentModified exceptions. (PR: [#80549](https://github.com/dotnet/roslyn/pull/80549))
29+
* Update proposal adjuster to acquire feature flags from VS (PR: [#80541](https://github.com/dotnet/roslyn/pull/80541))
30+
* Add telemetry indicating when file-based programs are used (PR: [#80538](https://github.com/dotnet/roslyn/pull/80538))
31+
* Fix thread safety issue in BuildServerConnection.TryCreateServer environment variable handling (PR: [#80498](https://github.com/dotnet/roslyn/pull/80498))
32+
* Extensions: refine tracking of used imports (PR: [#80485](https://github.com/dotnet/roslyn/pull/80485))
33+
* Disambiguate extension methods in "ambiguous call" error message when they have the same name but are from different assemblies (PR: [#80453](https://github.com/dotnet/roslyn/pull/80453))
34+
* Block file-local EmbeddedAttribute definitions. (PR: [#80501](https://github.com/dotnet/roslyn/pull/80501))
35+
* Extension block members do not have `this` parameter (PR: [#80457](https://github.com/dotnet/roslyn/pull/80457))
36+
* Handle some scenarios where attributes applied in local functions or lambdas within extension blocks were missing in metadata (PR: [#80464](https://github.com/dotnet/roslyn/pull/80464))
37+
* Unset other DOTNET_ROOT env vars when launching apphosts (PR: [#80492](https://github.com/dotnet/roslyn/pull/80492))
38+
* Add friendlier error message on an explicit implementation when the return type is wrong (PR: [#8037](https://github.com/dotnet/roslyn/pull/80376)
39+
* Extensions: add Name property on embedded ExtensionMarkerAttribute (PR: [#80456](https://github.com/dotnet/roslyn/pull/80456))
40+
* Avoid implicit null checks while narrowing type for `or` patterns (PR: [#80348](https://github.com/dotnet/roslyn/pull/80348))
2441

2542
# 2.93.x
2643
* Bump Roslyn to 5.0.0-2.25472.11 (PR: [#8646](https://github.com/dotnet/vscode-csharp/pull/8646))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"workspace"
4141
],
4242
"defaults": {
43-
"roslyn": "5.1.0-1.25475.3",
43+
"roslyn": "5.1.0-1.25506.3",
4444
"omniSharp": "1.39.14",
4545
"razor": "10.0.0-preview.25472.6",
4646
"razorOmnisharp": "7.0.0-preview.23363.1",

src/shared/projectConfiguration.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export interface ProjectConfigurationMessage {
1919
FileExtensions: string[];
2020
FileCounts: number[];
2121
SdkStyleProject: boolean;
22+
HasSolutionFile?: boolean;
23+
IsFileBasedProgram?: boolean;
24+
IsMiscellaneousFile?: boolean;
2225
}
2326

2427
export function reportProjectConfigurationEvent(
@@ -47,6 +50,18 @@ export function reportProjectConfigurationEvent(
4750
telemetryProps['NetSdkVersion'] = dotnetInfo?.Version ?? '';
4851
telemetryProps['sdkStyleProject'] = projectConfig.SdkStyleProject.toString();
4952

53+
if (projectConfig.HasSolutionFile != null) {
54+
telemetryProps['HasSolutionFile'] = projectConfig.HasSolutionFile.toString();
55+
}
56+
57+
if (projectConfig.IsFileBasedProgram != null) {
58+
telemetryProps['IsFileBasedProgram'] = projectConfig.IsFileBasedProgram.toString();
59+
}
60+
61+
if (projectConfig.IsMiscellaneousFile != null) {
62+
telemetryProps['IsMiscellaneousFile'] = projectConfig.IsMiscellaneousFile.toString();
63+
}
64+
5065
if (useModernNet) {
5166
telemetryProps['useModernNet'] = useModernNet.toString();
5267
}

test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ describe('TelemetryReporterObserver', () => {
100100
FileExtensions: fileExtensions,
101101
FileCounts: fileCounts,
102102
SdkStyleProject: sdkStyleProject,
103+
HasSolutionFile: true,
104+
IsFileBasedProgram: true,
105+
IsMiscellaneousFile: true,
103106
});
104107

105108
await observer.post(event);
@@ -114,6 +117,9 @@ describe('TelemetryReporterObserver', () => {
114117
expect(property['FileCounts']).toEqual('7|3');
115118
expect(property['useModernNet']).toEqual('true');
116119
expect(property['sdkStyleProject']).toEqual('true');
120+
expect(property['HasSolutionFile']).toEqual('true');
121+
expect(property['IsFileBasedProgram']).toEqual('true');
122+
expect(property['IsMiscellaneousFile']).toEqual('true');
117123
});
118124

119125
[

0 commit comments

Comments
 (0)