Repository: microsoft/terminal
File: src/terminal/parser/telemetry.cpp (C++)

Code before:
        {
            // I could use the TraceLoggingUIntArray, but then we would have to know the order of the enums on the backend.
            // So just log each enum count separately with its string representation which makes it more human readable.
            // Set the related activity to NULL since we aren't using it.
            TraceLoggingWriteActivity(g_hConsoleVirtTermParserEventTraceProvider,
                                      "ControlCodesUsed",
                                      &_activityId,
                                      NULL,
                                      TraceLoggingUInt32(_uiTimesUsed[CUU], "CUU"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUD], "CUD"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUF], "CUF"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUB], "CUB"),
                                      TraceLoggingUInt32(_uiTimesUsed[CNL], "CNL"),
                                      TraceLoggingUInt32(_uiTimesUsed[CPL], "CPL"),
                                      TraceLoggingUInt32(_uiTimesUsed[CHA], "CHA"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUP], "CUP"),
                                      TraceLoggingUInt32(_uiTimesUsed[ED], "ED"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSED], "DECSED"),
                                      TraceLoggingUInt32(_uiTimesUsed[EL], "EL"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSEL], "DECSEL"),
                                      TraceLoggingUInt32(_uiTimesUsed[SGR], "SGR"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSC], "DECSC"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECRC], "DECRC"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSET], "SM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSET], "DECSET"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECRST], "RM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECRST], "DECRST"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECKPAM], "DECKPAM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECKPNM], "DECKPNM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DSR], "DSR"),
                                      TraceLoggingUInt32(_uiTimesUsed[DA], "DA"),
                                      TraceLoggingUInt32(_uiTimesUsed[DA2], "DA2"),
                                      TraceLoggingUInt32(_uiTimesUsed[DA3], "DA3"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECREQTPARM], "DECREQTPARM"),
                                      TraceLoggingUInt32(_uiTimesUsed[VPA], "VPA"),
                                      TraceLoggingUInt32(_uiTimesUsed[HPR], "HPR"),
                                      TraceLoggingUInt32(_uiTimesUsed[VPR], "VPR"),
                                      TraceLoggingUInt32(_uiTimesUsed[ICH], "ICH"),
                                      TraceLoggingUInt32(_uiTimesUsed[DCH], "DCH"),
                                      TraceLoggingUInt32(_uiTimesUsed[IL], "IL"),
                                      TraceLoggingUInt32(_uiTimesUsed[DL], "DL"),
                                      TraceLoggingUInt32(_uiTimesUsed[SU], "SU"),
                                      TraceLoggingUInt32(_uiTimesUsed[SD], "SD"),
                                      TraceLoggingUInt32(_uiTimesUsed[ANSISYSSC], "ANSISYSSC"),
                                      TraceLoggingUInt32(_uiTimesUsed[ANSISYSRC], "ANSISYSRC"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSTBM], "DECSTBM"),
                                      TraceLoggingUInt32(_uiTimesUsed[NEL], "NEL"),
                                      TraceLoggingUInt32(_uiTimesUsed[IND], "IND"),
                                      TraceLoggingUInt32(_uiTimesUsed[RI], "RI"),
                                      TraceLoggingUInt32(_uiTimesUsed[OSCWT], "OscWindowTitle"),
                                      TraceLoggingUInt32(_uiTimesUsed[HTS], "HTS"),

Review comment (suggestion):
```suggestion
                                      TraceLoggingUInt32(_uiTimesUsed[RM], "RM"),
```

(if I understand this correctly)

Code after:
        {
            // I could use the TraceLoggingUIntArray, but then we would have to know the order of the enums on the backend.
            // So just log each enum count separately with its string representation which makes it more human readable.
            // Set the related activity to NULL since we aren't using it.
            TraceLoggingWriteActivity(g_hConsoleVirtTermParserEventTraceProvider,
                                      "ControlCodesUsed",
                                      &_activityId,
                                      NULL,
                                      TraceLoggingUInt32(_uiTimesUsed[CUU], "CUU"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUD], "CUD"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUF], "CUF"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUB], "CUB"),
                                      TraceLoggingUInt32(_uiTimesUsed[CNL], "CNL"),
                                      TraceLoggingUInt32(_uiTimesUsed[CPL], "CPL"),
                                      TraceLoggingUInt32(_uiTimesUsed[CHA], "CHA"),
                                      TraceLoggingUInt32(_uiTimesUsed[CUP], "CUP"),
                                      TraceLoggingUInt32(_uiTimesUsed[ED], "ED"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSED], "DECSED"),
                                      TraceLoggingUInt32(_uiTimesUsed[EL], "EL"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSEL], "DECSEL"),
                                      TraceLoggingUInt32(_uiTimesUsed[SGR], "SGR"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSC], "DECSC"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECRC], "DECRC"),
                                      TraceLoggingUInt32(_uiTimesUsed[SM], "SM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSET], "DECSET"),
                                      TraceLoggingUInt32(_uiTimesUsed[RM], "RM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECRST], "DECRST"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECKPAM], "DECKPAM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECKPNM], "DECKPNM"),
                                      TraceLoggingUInt32(_uiTimesUsed[DSR], "DSR"),
                                      TraceLoggingUInt32(_uiTimesUsed[DA], "DA"),
                                      TraceLoggingUInt32(_uiTimesUsed[DA2], "DA2"),
                                      TraceLoggingUInt32(_uiTimesUsed[DA3], "DA3"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECREQTPARM], "DECREQTPARM"),
                                      TraceLoggingUInt32(_uiTimesUsed[VPA], "VPA"),
                                      TraceLoggingUInt32(_uiTimesUsed[HPR], "HPR"),
                                      TraceLoggingUInt32(_uiTimesUsed[VPR], "VPR"),
                                      TraceLoggingUInt32(_uiTimesUsed[ICH], "ICH"),
                                      TraceLoggingUInt32(_uiTimesUsed[DCH], "DCH"),
                                      TraceLoggingUInt32(_uiTimesUsed[IL], "IL"),
                                      TraceLoggingUInt32(_uiTimesUsed[DL], "DL"),
                                      TraceLoggingUInt32(_uiTimesUsed[SU], "SU"),
                                      TraceLoggingUInt32(_uiTimesUsed[SD], "SD"),
                                      TraceLoggingUInt32(_uiTimesUsed[ANSISYSSC], "ANSISYSSC"),
                                      TraceLoggingUInt32(_uiTimesUsed[ANSISYSRC], "ANSISYSRC"),
                                      TraceLoggingUInt32(_uiTimesUsed[DECSTBM], "DECSTBM"),
                                      TraceLoggingUInt32(_uiTimesUsed[NEL], "NEL"),
                                      TraceLoggingUInt32(_uiTimesUsed[IND], "IND"),
                                      TraceLoggingUInt32(_uiTimesUsed[RI], "RI"),
                                      TraceLoggingUInt32(_uiTimesUsed[OSCWT], "OscWindowTitle"),
                                      TraceLoggingUInt32(_uiTimesUsed[HTS], "HTS"),