Skip to content

Commit 82ada67

Browse files
authored
Merge pull request #112 from microsoft/jessecol/set-privacy-product
Telemetry: Set PartA_PrivacyProduct (DO NOT MERGE)
2 parents 0a8bd0b + 619bb66 commit 82ada67

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/winapp-CLI/WinApp.Cli/Telemetry/Events/EventBase.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
namespace WinApp.Cli.Telemetry.Events;
88

9+
public class PrivacyProduct
10+
{
11+
public static readonly UInt16
12+
#pragma warning disable CA1707 // Identifiers should not contain underscores
13+
WIN_APP_DEV_CLI = 78;
14+
#pragma warning restore CA1707 // Identifiers should not contain underscores
15+
};
16+
917
/// <summary>
1018
/// Base class for all telemetry events to ensure they are properly tagged.
1119
/// </summary>
@@ -21,11 +29,17 @@ public abstract class EventBase
2129
/// </summary>
2230
#pragma warning disable CA1707 // Identifiers should not contain underscores
2331
public abstract PartA_PrivTags PartA_PrivTags
24-
#pragma warning restore CA1707 // Identifiers should not contain underscores
2532
{
2633
get;
2734
}
2835

36+
/// <summary>
37+
/// PartA_PrivacyProduct must be set for the telemetry event to be logged when in the WinExt provider group.
38+
/// </summary>
39+
public UInt16 PartA_PrivacyProduct { get; } = PrivacyProduct.WIN_APP_DEV_CLI;
40+
41+
#pragma warning restore CA1707 // Identifiers should not contain underscores
42+
2943
/// <summary>
3044
/// Gets the app version from the assembly.
3145
/// </summary>

src/winapp-CLI/WinApp.Cli/Telemetry/Telemetry.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public void LogException(string action, Exception e, Guid? relatedActivityId = n
164164
innerStackTrace = innerStackTrace.ToString(),
165165
message = this.ReplaceSensitiveStrings(e.Message),
166166
PartA_PrivTags = PartA_PrivTags.ProductAndServicePerformance,
167+
PartA_PrivacyProduct = PrivacyProduct.WIN_APP_DEV_CLI,
167168
},
168169
relatedActivityId,
169170
isError: true);
@@ -185,6 +186,7 @@ public void LogTimeTaken(string eventName, uint timeTakenMilliseconds, Guid? rel
185186
eventName,
186187
timeTakenMilliseconds,
187188
PartA_PrivTags = PartA_PrivTags.ProductAndServicePerformance,
189+
PartA_PrivacyProduct = PrivacyProduct.WIN_APP_DEV_CLI,
188190
},
189191
relatedActivityId,
190192
isError: false);

0 commit comments

Comments
 (0)