-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add telemetry to store where and which version of git.exe was detected * Strip trailing newline from git version
- Loading branch information
1 parent
4543131
commit be38a85
Showing
2 changed files
with
82 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Diagnostics.Tracing; | ||
using DevHome.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry; | ||
using Microsoft.Diagnostics.Telemetry.Internal; | ||
|
||
namespace DevHome.Common.TelemetryEvents.GitExtension; | ||
|
||
// How git.exe was located | ||
public enum GitDetectStatus | ||
{ | ||
// git.exe was not found on the system | ||
NotFound, | ||
|
||
// In the PATH environment variable | ||
PathEnvironmentVariable, | ||
|
||
// Probed well-known registry keys to find a Git install location | ||
RegistryProbe, | ||
|
||
// Probed well-known folders under Program Files [(x86)] | ||
ProgramFiles, | ||
} | ||
|
||
[EventData] | ||
public class GitDetectEvent : EventBase | ||
{ | ||
public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; | ||
|
||
public string Status { get; } | ||
|
||
public string Version { get; } | ||
|
||
public GitDetectEvent(GitDetectStatus status, string version) | ||
{ | ||
Status = status.ToString(); | ||
Version = version; | ||
} | ||
|
||
public override void ReplaceSensitiveStrings(Func<string, string> replaceSensitiveStrings) | ||
{ | ||
// This event so far has no sensitive strings | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters