// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Diagnostics.Tracing; using PreviewHandlerCommon.Telemetry; namespace Microsoft.PowerLauncher.Telemetry { /// /// Telemetry helper class for Svg renderer. /// public class PowerLauncherTelemetry : TelemetryBase { /// /// Name for ETW event. /// private const string EventSourceName = "Microsoft.PowerToys"; /// /// Initializes a new instance of the class. /// public PowerLauncherTelemetry() : base(EventSourceName) { } /// /// Gets an instance of the class. /// public static PowerLauncherTelemetry Log = new PowerLauncherTelemetry(); /// /// Publishes ETW event when an action is triggered on /// public void WriteEvent(T telemetryEvent) where T : IEvent { this.Write(telemetryEvent.EventName, new EventSourceOptions() { Keywords = ProjectKeywordMeasure, Tags = ProjectTelemetryTagProductAndServicePerformance, }, telemetryEvent); } } }