TelemetryBase.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Diagnostics.Tracing; 6 7 // WARNING: THIS FILE GETS REPLACED ON THE BUILD FARM 8 namespace Microsoft.PowerToys.Telemetry 9 { 10 /// <summary> 11 /// Privacy Tag values 12 /// </summary> 13 public enum PartA_PrivTags 14 : ulong 15 { 16 /// <nodoc/> 17 None = 0, 18 19 /// <nodoc/> 20 ProductAndServicePerformance = 1, 21 22 /// <nodoc/> 23 ProductAndServiceUsage = 2, 24 } 25 26 /// <summary> 27 /// Base class for telemetry events. 28 /// </summary> 29 public class TelemetryBase : EventSource 30 { 31 /// <summary> 32 /// The event tag for this event source. 33 /// </summary> 34 public const EventTags ProjectTelemetryTagProductAndServicePerformance = (EventTags)0x0u; 35 36 /// <summary> 37 /// The event keyword for this event source. 38 /// </summary> 39 public const EventKeywords ProjectKeywordMeasure = (EventKeywords)0x0; 40 41 /// <summary> 42 /// Group ID for PowerToys project. 43 /// </summary> 44 private static readonly string[] PowerToysTelemetryTraits = { "ETW_GROUP", "{42749043-438c-46a2-82be-c6cbeb192ff2}" }; 45 46 /// <summary> 47 /// Initializes a new instance of the <see cref="TelemetryBase"/> class. 48 /// </summary> 49 /// <param name="eventSourceName">.</param> 50 public TelemetryBase( 51 string eventSourceName) 52 : base( 53 eventSourceName, 54 EventSourceSettings.EtwSelfDescribingEventFormat, 55 PowerToysTelemetryTraits) 56 { 57 return; 58 } 59 } 60 }