Skip to content

Commit 7394807

Browse files
committed
Revert "Add branding and unpackaged metadata to a few telemetry events (#18926)"
This reverts commit e21b2c6.
1 parent 54a7f2f commit 7394807

File tree

3 files changed

+8
-47
lines changed

3 files changed

+8
-47
lines changed

src/cascadia/TerminalApp/ShortcutActionDispatch.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "pch.h"
55
#include "ShortcutActionDispatch.h"
6-
#include "WtExeUtils.h"
76

87
#include "ShortcutActionDispatch.g.cpp"
98

@@ -54,22 +53,11 @@ namespace winrt::TerminalApp::implementation
5453

5554
if (handled)
5655
{
57-
#if defined(WT_BRANDING_RELEASE)
58-
constexpr uint8_t branding = 3;
59-
#elif defined(WT_BRANDING_PREVIEW)
60-
constexpr uint8_t branding = 2;
61-
#elif defined(WT_BRANDING_CANARY)
62-
constexpr uint8_t branding = 1;
63-
#else
64-
constexpr uint8_t branding = 0;
65-
#endif
66-
6756
TraceLoggingWrite(
6857
g_hTerminalAppProvider,
6958
"ActionDispatched",
7059
TraceLoggingDescription("Event emitted when an action was successfully performed"),
7160
TraceLoggingValue(static_cast<int>(actionAndArgs.Action()), "Action"),
72-
TraceLoggingValue(branding, "Branding"),
7361
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
7462
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
7563
}

src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "ProfileEntry.h"
2828
#include "FolderEntry.h"
2929
#include "MatchProfilesEntry.h"
30-
#include "WtExeUtils.h"
3130

3231
using namespace winrt::Windows::Foundation::Collections;
3332
using namespace winrt::Windows::ApplicationModel::AppExtensions;
@@ -1671,22 +1670,10 @@ void CascadiaSettings::LogSettingChanges(bool isJsonLoad) const
16711670
changes.insert(change);
16721671
}
16731672

1674-
#if defined(WT_BRANDING_RELEASE)
1675-
constexpr uint8_t branding = 3;
1676-
#elif defined(WT_BRANDING_PREVIEW)
1677-
constexpr uint8_t branding = 2;
1678-
#elif defined(WT_BRANDING_CANARY)
1679-
constexpr uint8_t branding = 1;
1680-
#else
1681-
constexpr uint8_t branding = 0;
1682-
#endif
1683-
const uint8_t distribution = IsPackaged() ? 2 :
1684-
IsPortableMode() ? 1 :
1685-
0;
1686-
16871673
// report changes
16881674
for (const auto& change : changes)
16891675
{
1676+
#ifndef _DEBUG
16901677
// A `isJsonLoad ? "JsonSettingsChanged" : "UISettingsChanged"`
16911678
// would be nice, but that apparently isn't allowed in the macro below.
16921679
// Also, there's guidance to not send too much data all in one event,
@@ -1696,9 +1683,7 @@ void CascadiaSettings::LogSettingChanges(bool isJsonLoad) const
16961683
TraceLoggingWrite(g_hSettingsModelProvider,
16971684
"JsonSettingsChanged",
16981685
TraceLoggingDescription("Event emitted when settings.json change"),
1699-
TraceLoggingValue(change.data(), "Setting"),
1700-
TraceLoggingValue(branding, "Branding"),
1701-
TraceLoggingValue(distribution, "Distribution"),
1686+
TraceLoggingValue(change.data()),
17021687
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
17031688
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
17041689
}
@@ -1707,11 +1692,14 @@ void CascadiaSettings::LogSettingChanges(bool isJsonLoad) const
17071692
TraceLoggingWrite(g_hSettingsModelProvider,
17081693
"UISettingsChanged",
17091694
TraceLoggingDescription("Event emitted when settings change via the UI"),
1710-
TraceLoggingValue(change.data(), "Setting"),
1711-
TraceLoggingValue(branding, "Branding"),
1712-
TraceLoggingValue(distribution, "Distribution"),
1695+
TraceLoggingValue(change.data()),
17131696
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
17141697
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
17151698
}
1699+
#else
1700+
OutputDebugStringA(isJsonLoad ? "JsonSettingsChanged - " : "UISettingsChanged - ");
1701+
OutputDebugStringA(change.data());
1702+
OutputDebugStringA("\n");
1703+
#endif // !_DEBUG
17161704
}
17171705
}

src/cascadia/WindowsTerminal/WindowThread.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -195,25 +195,10 @@ int WindowThread::_messagePump()
195195

196196
if (!_loggedInteraction && (message.message == WM_KEYDOWN || message.message == WM_SYSKEYDOWN))
197197
{
198-
#if defined(WT_BRANDING_RELEASE)
199-
constexpr uint8_t branding = 3;
200-
#elif defined(WT_BRANDING_PREVIEW)
201-
constexpr uint8_t branding = 2;
202-
#elif defined(WT_BRANDING_CANARY)
203-
constexpr uint8_t branding = 1;
204-
#else
205-
constexpr uint8_t branding = 0;
206-
#endif
207-
const uint8_t distribution = IsPackaged() ? 2 :
208-
_appLogic.Settings().IsPortableMode() ? 1 :
209-
0;
210-
211198
TraceLoggingWrite(
212199
g_hWindowsTerminalProvider,
213200
"SessionBecameInteractive",
214201
TraceLoggingDescription("Event emitted when the session was interacted with"),
215-
TraceLoggingValue(branding, "Branding"),
216-
TraceLoggingValue(distribution, "Distribution"),
217202
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
218203
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
219204
_loggedInteraction = true;

0 commit comments

Comments
 (0)