Add quality metrics for dotnetup #52792
Conversation
we should investigate if the error mapping can be outsourced as it seems silly we need to implement this ourselves
… is wrong failures some of the categories may be incorrect, but this is a good starting point
I also initially included the sha but I want to be able to sort by error an dont have to parse out the sha which should be mappable to /from the version. Still, I kept the outsource of the build sha to a separate file bc I liked that isolated shareable pattern.
- Add llm detection - first run disable env var - stderr over stdout
consolidate error logic code
Read more at dotnet#52789
|
The Mac failures seem to be a network issue. I don't think this is related as its happening on other branches too. |
dsplaisted
left a comment
There was a problem hiding this comment.
I've made it through reviewing the dotnetup project. I'll go ahead and submit my comments so far.
Remaining to review are the installation library and the tests.
|
@nagilson It looks like the comments that seemed to have gotten lost re-appeared when I submitted the review. So you got a bunch of more or less duplicate feedback. Sorry about that! :-) |
That's ok, thanks 😁 Sometimes feedback can be good enough it is worth repeating |
This reverts the bad change in commit a857a84.
|
I've addressed the feedback, thanks! |
|
Failures are in the SDK repo, w.r.t to lack of the new 'humanizer' package |
avg sum query correction split runtime and sdk versions into 2 graphs add graph for command success rate over time remove unuseful graph
Co-authored-by: Daniel Plaisted <[email protected]>
Co-authored-by: Daniel Plaisted <[email protected]>
Resolves #50609
(allow #52717 to be merged first - this pr needed code from that branch so we need to merge it back in)
Add OpenTel Data for dotnetup
Summary
This PR introduces telemetry for the
dotnetupCLI tool using OpenTelemetry with Azure Monitor. The telemetry provides actionable insights into installation success rates, user behavior patterns, and error analysis while maintaining PII rules.The current connection key uses my own local app insights because we'll switch to the SDK CLI one once that work has been done by someone else in the team. That shouldn't be used in production, but since this is a dev branch we are not yet releasing, seems like that's ok. I've filed an issue to track: #52785
https://aka.ms/dotnetup-telemetry points to the release/dnup branch for the doc for now, but eventually it'd go on ms learn.
#52784
Key Features
Telemetry Infrastructure
Azure.Monitor.OpenTelemetry.Exporterfor telemetry collectionDOTNET_CLI_TELEMETRY_OPTOUTenvironment variableError Categorization System
VersionNotFound,ManifestFetchFailed,HashMismatch,ArchiveCorrupted, etc.Success Rate Metrics
install.result(installed vs already_installed) for accurate installation countsUser Behavior Tracking (PII-Safe)
install.path_source: Where install path came from (explicit, global_json, default, etc.)install.path_type: Classification of path (system_programfiles, user_profile, local_appdata) - not actual pathsinstall.has_global_json: Whether project has global.jsoninstall.existing_install_type: Admin/User/none for existing installationssdk.request_source: How SDK version was specified (explicit, default-latest, default-globaljson)sdk.requested: Sanitized version stringPII Protection (Critical)
SetStatus()uses error type, notex.MessageRecordException(): Full exception objects not recorded (contain paths/PII)win32_error_5) instead of messages that may contain pathsAzure Workbook Dashboard
Example Data:
^ note some of this data is wrong / when the code was incorrect
Files Changed
New Files
Telemetry/DotnetupTelemetry.cs- Main telemetry singletonTelemetry/ErrorCodeMapper.cs- Exception to error info mapping with categorizationTelemetry/VersionSanitizer.cs- PII-safe version string sanitizationTelemetry/dotnetup-workbook.json- Azure Workbook dashboard definitionModified Files
CommandBase.cs- Template method for command telemetrySdkInstallCommand.cs- Comprehensive install behavior trackingInstallerOrchestratorSingleton.cs- ReturnsInstallResult, proper error throwingNonUpdatingProgressTarget.cs/SpectreProgressTarget.cs- Operation-level telemetryDotnetInstallException.cs- Extended error codesDotnetArchiveExtractor.cs,DotnetArchiveDownloader.cs,ReleaseManifest.cs- Error code usageFollow-up Items
aka.ms/dotnetup-telemetry(or similar) pointing to the telemetry documentation in therelease/dnupbranch of dotnet/sdk repositoryTesting
Telemetry Notice
Users will see a telemetry notice on first run. The notice should link to documentation (via aka.ms redirect) that explains:
DOTNET_CLI_TELEMETRY_OPTOUT=1)