mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 18:43:54 -06:00
Revert "Add branding and unpackaged metadata to a few telemetry events (#18926)"
This reverts commit e21b2c66437ea8a47bc73888e7bb5a5c434ce394.
This commit is contained in:
parent
54a7f2fd63
commit
7394807212
@ -3,7 +3,6 @@
|
||||
|
||||
#include "pch.h"
|
||||
#include "ShortcutActionDispatch.h"
|
||||
#include "WtExeUtils.h"
|
||||
|
||||
#include "ShortcutActionDispatch.g.cpp"
|
||||
|
||||
@ -54,22 +53,11 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
if (handled)
|
||||
{
|
||||
#if defined(WT_BRANDING_RELEASE)
|
||||
constexpr uint8_t branding = 3;
|
||||
#elif defined(WT_BRANDING_PREVIEW)
|
||||
constexpr uint8_t branding = 2;
|
||||
#elif defined(WT_BRANDING_CANARY)
|
||||
constexpr uint8_t branding = 1;
|
||||
#else
|
||||
constexpr uint8_t branding = 0;
|
||||
#endif
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalAppProvider,
|
||||
"ActionDispatched",
|
||||
TraceLoggingDescription("Event emitted when an action was successfully performed"),
|
||||
TraceLoggingValue(static_cast<int>(actionAndArgs.Action()), "Action"),
|
||||
TraceLoggingValue(branding, "Branding"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
}
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
#include "ProfileEntry.h"
|
||||
#include "FolderEntry.h"
|
||||
#include "MatchProfilesEntry.h"
|
||||
#include "WtExeUtils.h"
|
||||
|
||||
using namespace winrt::Windows::Foundation::Collections;
|
||||
using namespace winrt::Windows::ApplicationModel::AppExtensions;
|
||||
@ -1671,22 +1670,10 @@ void CascadiaSettings::LogSettingChanges(bool isJsonLoad) const
|
||||
changes.insert(change);
|
||||
}
|
||||
|
||||
#if defined(WT_BRANDING_RELEASE)
|
||||
constexpr uint8_t branding = 3;
|
||||
#elif defined(WT_BRANDING_PREVIEW)
|
||||
constexpr uint8_t branding = 2;
|
||||
#elif defined(WT_BRANDING_CANARY)
|
||||
constexpr uint8_t branding = 1;
|
||||
#else
|
||||
constexpr uint8_t branding = 0;
|
||||
#endif
|
||||
const uint8_t distribution = IsPackaged() ? 2 :
|
||||
IsPortableMode() ? 1 :
|
||||
0;
|
||||
|
||||
// report changes
|
||||
for (const auto& change : changes)
|
||||
{
|
||||
#ifndef _DEBUG
|
||||
// A `isJsonLoad ? "JsonSettingsChanged" : "UISettingsChanged"`
|
||||
// would be nice, but that apparently isn't allowed in the macro below.
|
||||
// Also, there's guidance to not send too much data all in one event,
|
||||
@ -1696,9 +1683,7 @@ void CascadiaSettings::LogSettingChanges(bool isJsonLoad) const
|
||||
TraceLoggingWrite(g_hSettingsModelProvider,
|
||||
"JsonSettingsChanged",
|
||||
TraceLoggingDescription("Event emitted when settings.json change"),
|
||||
TraceLoggingValue(change.data(), "Setting"),
|
||||
TraceLoggingValue(branding, "Branding"),
|
||||
TraceLoggingValue(distribution, "Distribution"),
|
||||
TraceLoggingValue(change.data()),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
}
|
||||
@ -1707,11 +1692,14 @@ void CascadiaSettings::LogSettingChanges(bool isJsonLoad) const
|
||||
TraceLoggingWrite(g_hSettingsModelProvider,
|
||||
"UISettingsChanged",
|
||||
TraceLoggingDescription("Event emitted when settings change via the UI"),
|
||||
TraceLoggingValue(change.data(), "Setting"),
|
||||
TraceLoggingValue(branding, "Branding"),
|
||||
TraceLoggingValue(distribution, "Distribution"),
|
||||
TraceLoggingValue(change.data()),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
}
|
||||
#else
|
||||
OutputDebugStringA(isJsonLoad ? "JsonSettingsChanged - " : "UISettingsChanged - ");
|
||||
OutputDebugStringA(change.data());
|
||||
OutputDebugStringA("\n");
|
||||
#endif // !_DEBUG
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,25 +195,10 @@ int WindowThread::_messagePump()
|
||||
|
||||
if (!_loggedInteraction && (message.message == WM_KEYDOWN || message.message == WM_SYSKEYDOWN))
|
||||
{
|
||||
#if defined(WT_BRANDING_RELEASE)
|
||||
constexpr uint8_t branding = 3;
|
||||
#elif defined(WT_BRANDING_PREVIEW)
|
||||
constexpr uint8_t branding = 2;
|
||||
#elif defined(WT_BRANDING_CANARY)
|
||||
constexpr uint8_t branding = 1;
|
||||
#else
|
||||
constexpr uint8_t branding = 0;
|
||||
#endif
|
||||
const uint8_t distribution = IsPackaged() ? 2 :
|
||||
_appLogic.Settings().IsPortableMode() ? 1 :
|
||||
0;
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hWindowsTerminalProvider,
|
||||
"SessionBecameInteractive",
|
||||
TraceLoggingDescription("Event emitted when the session was interacted with"),
|
||||
TraceLoggingValue(branding, "Branding"),
|
||||
TraceLoggingValue(distribution, "Distribution"),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
|
||||
_loggedInteraction = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user