mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[AOT] add some mudole editor open time, timestamp telemetry code (#38008)
* add some mudole editor open time, timestamp telemetry code * fix spelling error * fix namespace warrning --------- Co-authored-by: Zhaopeng Wang (from Dev Box) <zhaopengwang@microsoft.com>
This commit is contained in:
@@ -5,13 +5,15 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
using Common.UI;
|
||||
using FancyZoneEditor.Telemetry;
|
||||
using FancyZonesEditor.Utils;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
|
||||
namespace FancyZonesEditor
|
||||
{
|
||||
@@ -56,6 +58,8 @@ namespace FancyZonesEditor
|
||||
|
||||
public App()
|
||||
{
|
||||
PowerToysTelemetry.Log.WriteEvent(new FancyZonesEditorStartEvent() { TimeStamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() });
|
||||
|
||||
var languageTag = LanguageHelper.LoadLanguage();
|
||||
|
||||
if (!string.IsNullOrEmpty(languageTag))
|
||||
|
||||
@@ -13,11 +13,12 @@ using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
|
||||
using Common.UI;
|
||||
using FancyZoneEditor.Telemetry;
|
||||
using FancyZonesEditor.Models;
|
||||
using FancyZonesEditor.Utils;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using ModernWpf.Controls;
|
||||
|
||||
namespace FancyZonesEditor
|
||||
@@ -69,6 +70,8 @@ namespace FancyZonesEditor
|
||||
|
||||
// reinit considering work area rect
|
||||
_settings.InitModels();
|
||||
|
||||
PowerToysTelemetry.Log.WriteEvent(new FancyZonesEditorStartFinishEvent() { TimeStamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() });
|
||||
}
|
||||
|
||||
private void BringToFront()
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// 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 Microsoft.PowerToys.Telemetry;
|
||||
using Microsoft.PowerToys.Telemetry.Events;
|
||||
|
||||
namespace FancyZoneEditor.Telemetry;
|
||||
|
||||
[EventData]
|
||||
public class FancyZonesEditorStartEvent() : EventBase, IEvent
|
||||
{
|
||||
public long TimeStamp { get; set; }
|
||||
|
||||
public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// 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 Microsoft.PowerToys.Telemetry;
|
||||
using Microsoft.PowerToys.Telemetry.Events;
|
||||
|
||||
namespace FancyZoneEditor.Telemetry;
|
||||
|
||||
[EventData]
|
||||
public class FancyZonesEditorStartFinishEvent() : EventBase, IEvent
|
||||
{
|
||||
public long TimeStamp { get; set; }
|
||||
|
||||
public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage;
|
||||
}
|
||||
Reference in New Issue
Block a user