dotnet / dotnet/sdk

Improve telemetry understanding about the results of implicit/explicit restores

Open
#52,943 0 comments 1 reaction 2 assignees Claimed by @baronfel View on GitHub
Area-Telemetry untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is your feature request related to a problem? Please describe.

Restore is an action that happens _incredibly_ frequently across our tooling/ecosystem, but we don't have a good handle on how frequently it's actually useful/necessary.

We should be able to say things like "60% of all restores were actually unnecessary", or "implicit restores tend to be unnecessary - users seem to be doing explicit restores beforehand"

### Describe the solution you'd like
We should be able to gather a new piece of MSBuild-based telemetry that fires after the `Restore` target and collects data from that Target + the ambient build to drive this kind of analysis.

Data that we should gather:
* Restore type: implicit (`/restore)` vs explicit (`-t:Restore` or `dotnet restore`)
* Restore scope: workspace (solution/traversal) vs single-project
* measures of the usefulness of the restore (from the NuGet Restore Task outputs):
```xml

```
* the time the restore took - this may be more difficult because this data isn't available inside the MSBuild execution environment

### Additional Context

When adding new telemetry, we must update the in-repo telemetry docs. MSBuild-based telemetry needs to come from the AllowEmptyTelemetry task, but timing information may need to be gathered by the CLI's injected MSBuild telemetry logger.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.