terminal/src/cascadia/TerminalControl/init.cpp
Dustin L. Howett (MSFT) 3f62c8b470
Add some ETL around profile, control and connection creation (#2125)
This commit adds some tracelogging (and telemetry) to answer the following questions:
* Do people use padding? If so, what is the common range of values?
* Are people turning off showTabsInTitlebar?
* How many different profiles are in use, and how do they break down between custom and default?
* Are people manually launching specific profiles, or using "default" fairly often?
* Are people using the Azure Cloud Shell connection?
* Are people leveraging the feature added in #2108 (autogenerating GUIDs)?
2019-07-29 17:24:20 -07:00

32 lines
892 B
C++

// Copyright (c) Microsoft Corporation
// Licensed under the MIT license.
#include "pch.h"
// Note: Generate GUID using TlgGuid.exe tool
TRACELOGGING_DEFINE_PROVIDER(
g_hTerminalControlProvider,
"Microsoft.Windows.Terminal.Control",
// {28c82e50-57af-5a86-c25b-e39cd990032b}
(0x28c82e50, 0x57af, 0x5a86, 0xc2, 0x5b, 0xe3, 0x9c, 0xd9, 0x90, 0x03, 0x2b),
TraceLoggingOptionMicrosoftTelemetry());
BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD reason, LPVOID /*reserved*/)
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDll);
TraceLoggingRegister(g_hTerminalControlProvider);
break;
case DLL_PROCESS_DETACH:
if (g_hTerminalControlProvider)
{
TraceLoggingUnregister(g_hTerminalControlProvider);
}
break;
}
return TRUE;
}