[General]Add an option for telemetry opt-in and visualization(#34078)

* Data diagnostics opt-in

* [c++] Drop DROP_PII flag

* Bump telemtry package to 2.0.2

* Drop DropPii from custom actions

* Cleanup

* Do not start manually C# EtwTrace. FZ engine exit event.

* ImageResizer, PowerRename, FileLocksmith prev handlers

* Revert C# handlers exe logging

* Revert "Revert C# handlers exe logging"

This reverts commit 4c75a3953b.

* Do not recreate EtwTrace

* consume package

* xaml formatting

* Fix deps.json audit

* Update telem package paths

* Address PR comments

* Fix AdvancedPaste close on PT close

* Override etl file name for explorer loaded dlls
Start/stop tracer when needed for explorer loaded dlls to prevent explorer overload

* Fix setting desc

* Fix missing events

* Add infobar to restart when enable data viewing

* Flush on timer every 30s

* [Settings] Update View Data diagnostic description text
[New+] Add tracer

* Show Restart info bar for both enable/disable data viewer

* Fix newplus

* Fix stuck on restart and terminate AdvPaste exe on destroy()

* [Installer] Add tracer

* Address PR comment

* Add missing tracers

* Exclude etw dir from BugReport

* Fix bad merge

* [Hosts] Proper exit on initial dialog

* [OOBE] Make Data diagnostic setting visible without scroll

* [OOBE] Add hiperlynk to open general settings

* Disable data view on disabling data diagnostics

* Don't disable View data button

* Fix disabling data viewing

* Add missing dot

* Revert formatting
This commit is contained in:
Stefan Markovic
2024-10-24 22:04:32 +02:00
committed by GitHub
parent f9127b63a5
commit 133aa85f2b
269 changed files with 2622 additions and 1256 deletions

View File

@@ -188,6 +188,9 @@
<ProjectReference Include="..\..\..\common\logger\logger.vcxproj">
<Project>{d9b8fc84-322a-4f9f-bbb9-20915c47ddfd}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\common\Telemetry\EtwTrace\EtwTrace.vcxproj">
<Project>{8f021b46-362b-485c-bfba-ccf83e820cbd}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\common\Themes\Themes.vcxproj">
<Project>{98537082-0fdb-40de-abd8-0dc5a4269bab}</Project>
</ProjectReference>

View File

@@ -65,7 +65,4 @@
<ItemGroup>
<ResourceCompile Include="PowerRenameUI.rc" />
</ItemGroup>
<ItemGroup>
<Natvis Include="$(MSBuildThisFileDirectory)..\..\natvis\wil.natvis" />
</ItemGroup>
</Project>

View File

@@ -12,6 +12,8 @@
#include <common/utils/logger_helper.h>
#include <common/utils/process_path.h>
#include <common/Telemetry/EtwTrace/EtwTrace.h>
#include <atlstr.h>
#include <exception>
#include <string>
@@ -104,6 +106,8 @@ namespace winrt::PowerRenameUI::implementation
MainWindow::MainWindow() :
m_allSelected{ true }, m_managerEvents{ this }
{
Trace::RegisterProvider();
auto windowNative{ this->try_as<::IWindowNative>() };
winrt::check_bool(windowNative);
windowNative->get_WindowHandle(&m_window);
@@ -211,6 +215,8 @@ namespace winrt::PowerRenameUI::implementation
InitializeComponent();
m_etwTrace.UpdateState(true);
listView_ExplorerItems().ApplyTemplate();
#ifdef ENABLE_RECYCLING_VIRTUALIZATION_MODE
if (auto scrollViewer = FindScrollViewer(listView_ExplorerItems()); scrollViewer)
@@ -313,6 +319,11 @@ namespace winrt::PowerRenameUI::implementation
{
LastRunSettingsInstance().UpdateLastWindowSize(m_updatedWindowSize->first, m_updatedWindowSize->second);
}
m_etwTrace.Flush();
m_etwTrace.UpdateState(false);
Trace::UnregisterProvider();
}
void MainWindow::InvalidateItemListViewState()

View File

@@ -5,6 +5,8 @@
#include "winrt/Windows.UI.Xaml.Interop.h"
#include "winrt/Windows.UI.Xaml.Controls.Primitives.h"
#include <common/Telemetry/EtwTrace/EtwTrace.h>
#include "MainWindow.g.h"
#include "PatternSnippet.h"
#include "ExplorerItem.h"
@@ -143,6 +145,8 @@ namespace winrt::PowerRenameUI::implementation
void SetCheckboxesFromFlags(DWORD flags);
void UpdateCounts();
Shared::Trace::ETWTrace m_etwTrace{};
HWND m_window{};
bool m_disableCountUpdate = false;