Skip to content

Commit 56ccb8e

Browse files
authored
Merge branch 'release/10.0.1xx' into backport/pr-42266-to-release/10.0.1xx
2 parents 5d8f918 + 2da7939 commit 56ccb8e

File tree

131 files changed

+1119
-897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1119
-897
lines changed

documentation/project-docs/telemetry.md

Lines changed: 59 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# .NET SDK Telemetry Documentation
22

33
## Table of Contents
4+
45
- [.NET SDK Telemetry Documentation](#net-sdk-telemetry-documentation)
56
- [Table of Contents](#table-of-contents)
67
- [How to Control Telemetry](#how-to-control-telemetry)
@@ -25,7 +26,6 @@ The .NET SDK telemetry can be disabled using the following environment variable:
2526
- Example: `set DOTNET_CLI_TELEMETRY_OPTOUT=1` (Windows)
2627
- Note: this value is defaulted to `true` on non-Microsoft-provided builds of the .NET SDK (e.g. those provided by our Linux Distro partners, through Source Build, etc.)
2728

28-
2929
### Related Environment Variables
3030

3131
- **`DOTNET_NOLOGO`**: Set to `true` to hide .NET welcome and telemetry messages on first run
@@ -40,7 +40,6 @@ The .NET SDK telemetry can be disabled using the following environment variable:
4040
- For Microsoft official builds: Telemetry is **enabled by default** (opt-out model)
4141
- For non-Microsoft builds: Telemetry is **disabled by default** (controlled by `MICROSOFT_ENABLE_TELEMETRY` compile flag)
4242

43-
4443
- **Connection String**: Telemetry data is sent to Application Insights with instrumentation key: `74cc1c9e-3e6e-4d05-b3fc-dde9101d0254`
4544

4645
- **First Time Use**: Telemetry is only collected after the first-time-use notice has been shown and accepted (tracked via sentinel file)
@@ -51,8 +50,6 @@ The .NET SDK telemetry can be disabled using the following environment variable:
5150

5251
Every telemetry event automatically includes these common properties:
5352

54-
55-
5653
| Property | Description | Example Value |
5754
|----------|-------------|---------------|
5855
| **OS Version** | Operating system version | `Microsoft Windows 10.0.14393` |
@@ -64,6 +61,7 @@ Every telemetry event automatically includes these common properties:
6461
| **Telemetry Profile** | Custom telemetry profile (if set via env var) | Custom value or null |
6562
| **Docker Container** | Whether running in Docker container | `True` or `False` |
6663
| **CI** | Whether running in CI environment | `True` or `False` |
64+
| **LLM** | Detected LLM/assistant environment identifiers (comma-separated) | `claude` or `cursor` |
6765
| **Current Path Hash** | SHA256 hash of current directory path | Hashed value |
6866
| **Machine ID** | SHA256 hash of machine MAC address (or GUID if unavailable) | Hashed value |
6967
| **Machine ID Old** | Legacy machine ID for compatibility | Hashed value |
@@ -80,29 +78,35 @@ Every telemetry event automatically includes these common properties:
8078
### Core CLI Events
8179

8280
#### `command/finish`
81+
8382
**When fired**: At the end of every dotnet CLI command execution
8483

8584
**Properties**:
85+
8686
- `exitCode`: The exit code of the command
8787

8888
**Description**: Tracks the completion status of any dotnet command
8989

9090
---
9191

9292
#### `schema`
93+
9394
**When fired**: When CLI schema is generated or accessed
9495

9596
**Properties**:
97+
9698
- `command`: The command hierarchy as a string
9799

98100
**Description**: Tracks schema generation for the CLI
99101

100102
---
101103

102104
#### `toplevelparser/command`
105+
103106
**When fired**: For every top-level dotnet command
104107

105108
**Properties**:
109+
106110
- `verb`: Top-level command name (build, restore, publish, etc.)
107111

108112
**Measurements**: Performance data (startup time, parse time, etc.)
@@ -112,6 +116,7 @@ Every telemetry event automatically includes these common properties:
112116
---
113117

114118
#### `sublevelparser/command`
119+
115120
**When fired**: For subcommands and specific command options
116121

117122
**Properties**: Various depending on command (verbosity, configuration, framework, etc.)
@@ -121,9 +126,11 @@ Every telemetry event automatically includes these common properties:
121126
---
122127

123128
#### `commandresolution/commandresolved`
129+
124130
**When fired**: When a command is resolved through the command factory
125131

126132
**Properties**:
133+
127134
- `commandName`: SHA256 hash of command name
128135
- `commandResolver`: Type of command resolver used
129136

@@ -132,19 +139,23 @@ Every telemetry event automatically includes these common properties:
132139
---
133140

134141
#### `install/reportsuccess`
142+
135143
**When fired**: When installation success is reported
136144

137145
**Properties**:
146+
138147
- `exeName`: Name of the install method that was used - one of `debianpackage`, a specific macOS `.pkg` file name, or a specific Windows exe installer file name.
139148

140149
**Description**: Tracks successful tool installations
141150

142151
---
143152

144153
#### `mainCatchException/exception`
154+
145155
**When fired**: When unhandled exceptions occur in the main CLI
146156

147157
**Properties**:
158+
148159
- `exceptionType`: Type of exception
149160
- `detail`: Exception details (sensitive message removed)
150161

@@ -153,19 +164,23 @@ Every telemetry event automatically includes these common properties:
153164
### Template Engine Events
154165

155166
#### `template/new-install`
167+
156168
**When fired**: During template package installation
157169

158170
**Properties**:
171+
159172
- `CountOfThingsToInstall`: Number of template packages being installed
160173

161174
**Description**: Tracks template package installation operations
162175

163176
---
164177

165178
#### `template/new-create-template`
179+
166180
**When fired**: When creating a new project from template
167181

168182
**Properties**:
183+
169184
- `language`: Template language (C#, F#, VB, etc)
170185
- `argument-error`: Whether there were argument errors ("True"/"False")
171186
- `framework`: Framework choice (only sent for Microsoft-authored templates)
@@ -182,9 +197,11 @@ Every telemetry event automatically includes these common properties:
182197
### SDK-Collected Build Events
183198

184199
#### `msbuild/targetframeworkeval`
200+
185201
**When fired**: When target framework is evaluated
186202

187203
**Properties**:
204+
188205
- `TargetFrameworkVersion`: Target framework version
189206
- `RuntimeIdentifier`: Runtime identifier
190207
- `SelfContained`: Whether self-contained
@@ -197,11 +214,12 @@ Every telemetry event automatically includes these common properties:
197214

198215
---
199216

200-
201217
#### `taskBaseCatchException`
218+
202219
**When fired**: When exceptions occur in SDK-provided MSBuild tasks
203220

204221
**Properties**:
222+
205223
- `exceptionType`: Exception type
206224
- `detail`: Exception details (message removed)
207225

@@ -210,53 +228,60 @@ Every telemetry event automatically includes these common properties:
210228
---
211229

212230
#### `PublishProperties`
231+
213232
**When fired**: During the Publish Target
214233

215234
**Properties**: Gathers the values of the following MSBuild Properties if they are set in the project file or via command line:
216-
* PublishReadyToRun
217-
* PublishSingleFile
218-
* PublishTrimmed
219-
* PublishAot
220-
* PublishProtocol
235+
236+
- PublishReadyToRun
237+
- PublishSingleFile
238+
- PublishTrimmed
239+
- PublishAot
240+
- PublishProtocol
221241

222242
**Description**: Tracks publish-related properties
223243

224244
---
225245

226246
#### `WorkloadPublishProperties`
247+
227248
**When fired**: During workload publish operations
228249

229250
**Properties**: Gathers the values of the following MSBuild Properties if they are set in the project file or via command line:
230-
* TargetPlatformIdentifier: TargetPlatformIdentifier
231-
* RuntimeIdentifier: RuntimeIdentifier
232-
* BlazorWasm: _WorkloadUsesBlazorWasm
233-
* WasmSDK: _WorkloadUsesWasmSDK
234-
* UsesMaui: UseMaui
235-
* UsesMobileSDKOnly: _WorkloadUsesMobileSDKOnly
236-
* UsesOtherMobileSDK: _WorkloadUsesOther
237-
* MonoAOT: _WorkloadUsesMonoAOT
238-
* NativeAOT: _WorkloadUsesNativeAOT
239-
* Interp: _WorkloadUsesInterpreter
240-
* LibraryMode: _WorkloadUsesLibraryMode
241-
* ResolvedRuntimePack: _MonoWorkloadRuntimePackPackageVersion
242-
* StripILAfterAOT: _WorkloadUsesStripILAfterAOT
251+
252+
- TargetPlatformIdentifier: TargetPlatformIdentifier
253+
- RuntimeIdentifier: RuntimeIdentifier
254+
- BlazorWasm: _WorkloadUsesBlazorWasm
255+
- WasmSDK: _WorkloadUsesWasmSDK
256+
- UsesMaui: UseMaui
257+
- UsesMobileSDKOnly: _WorkloadUsesMobileSDKOnly
258+
- UsesOtherMobileSDK: _WorkloadUsesOther
259+
- MonoAOT: _WorkloadUsesMonoAOT
260+
- NativeAOT: _WorkloadUsesNativeAOT
261+
- Interp: _WorkloadUsesInterpreter
262+
- LibraryMode: _WorkloadUsesLibraryMode
263+
- ResolvedRuntimePack: _MonoWorkloadRuntimePackPackageVersion
264+
- StripILAfterAOT: _WorkloadUsesStripILAfterAOT
243265

244266
**Description**: Tracks workload-specific publish properties
245267

246268
---
247269

248270
#### `ReadyToRun`
271+
249272
**When fired**: During ReadyToRun compilation
250273

251274
**Properties**: Gathers the values of the following MSBuild Properties and Items if they are set in the project file or via command line:
252275

253-
* PublishReadyToRunUseCrossgen2: PublishReadyToRunUseCrossgen2
254-
* Crossgen2PackVersion: ResolvedCrossgen2Pack.NuGetPackageVersion
255-
* CompileListCount: _ReadyToRunCompileList->Count()
256-
* FailedCount: _ReadyToRunCompilationFailures->Count()
276+
- PublishReadyToRunUseCrossgen2: PublishReadyToRunUseCrossgen2
277+
- Crossgen2PackVersion: ResolvedCrossgen2Pack.NuGetPackageVersion
278+
- CompileListCount: _ReadyToRunCompileList->Count()
279+
- FailedCount: _ReadyToRunCompilationFailures->Count()
257280

258281
**Description**: Tracks ReadyToRun compilation usage
259282

283+
---
284+
260285
### MSBuild Engine Telemetry
261286

262287
See [MSBuild Telemetry Documentation](https://github.com/dotnet/msbuild/blob/main/documentation/wiki/CollectedTelemetry.md) for details on these events.
@@ -268,23 +293,26 @@ See [Container Telemetry Documentation](https://github.com/dotnet/sdk-container-
268293
### `dotnet new` Command MSBuild Evaluation
269294

270295
#### `new/msbuild-eval`
296+
271297
**When fired**: When MSBuild project evaluation occurs during `dotnet new`
272298

273299
**Properties** (hashed):
300+
274301
- `ProjectPath`: Project path
275302
- `SdkStyleProject`: Whether it's SDK-style project
276303
- `Status`: Evaluation status
277304
- `TargetFrameworks`: Target frameworks
278305

279306
**Measurements**:
307+
280308
- `EvaluationTime`: Total evaluation time in milliseconds
281309
- `InnerEvaluationTime`: Inner evaluation time in milliseconds
282310

283311
**Description**: Tracks MSBuild evaluation performance for new projects
284312

285313
## How to update this document
286314

287-
* Ensure that all telemetry events and properties are accurately documented
288-
* Review and update common properties as needed
289-
* Add new events or properties as they are introduced in the .NET SDK
290-
* Follow the pre-existing format
315+
- Ensure that all telemetry events and properties are accurately documented
316+
- Review and update common properties as needed
317+
- Add new events or properties as they are introduced in the .NET SDK
318+
- Follow the pre-existing format

src/Cli/dotnet/CliStrings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,4 +838,7 @@ The default is 'false.' However, when targeting .NET 7 or lower, the default is
838838
<data name="PackCmd_OneNuspecAllowed" xml:space="preserve">
839839
<value>Only one .nuspec file can be packed at a time</value>
840840
</data>
841+
<data name="Error_NU1302_HttpSourceUsed" xml:space="preserve">
842+
<value>You are running the 'tool install' operation with an 'HTTP' source: {0}. NuGet requires HTTPS sources. To use an HTTP source, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file. Refer to https://aka.ms/nuget-https-everywhere for more information.</value>
843+
</data>
841844
</root>

0 commit comments

Comments
 (0)