winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

MicrosoftTelemetry.h (3810B)


      1 /* ++
      2 
      3 Copyright (c) Microsoft Corporation. All rights reserved.
      4 Licensed under the MIT License. See LICENSE in the project root for license information.
      5 
      6 Module Name:
      7 
      8     MicrosoftTelemetry.h
      9 
     10 Abstract:
     11 
     12     Macro definitions used by this project's TraceLogging ETW providers:
     13 
     14     - Configuration macros that select the ETW Provider Groups to be used by
     15       this project.
     16     - Constants for tags that are commonly used in Microsoft's
     17       TraceLogging-based ETW.
     18 
     19     Different versions of this file use different definitions for the
     20     TraceLoggingOption configuration macros. The definitions in this file are
     21     empty. As a result, providers using this configuration file will not join
     22     any ETW Provider Groups and will not be given any special treatment by
     23     group-sensitive ETW listeners.
     24 
     25 Environment:
     26 
     27     User mode or kernel mode.
     28 
     29 --*/
     30 
     31 #pragma once
     32 
     33 // Configuration macro for use in TRACELOGGING_DEFINE_PROVIDER. The definition
     34 // in this file configures the provider as a normal (non-telemetry) provider.
     35 #define TraceLoggingOptionMicrosoftTelemetry() \
     36     // Empty definition for TraceLoggingOptionMicrosoftTelemetry
     37 
     38 // Configuration macro for use in TRACELOGGING_DEFINE_PROVIDER. The definition
     39 // in this file configures the provider as a normal (non-telemetry) provider.
     40 #define TraceLoggingOptionWindowsCoreTelemetry() \
     41     // Empty definition for TraceLoggingOptionWindowsCoreTelemetry
     42 
     43 // Event privacy tags. Use the PDT macro values for the tag parameter, e.g.:
     44 // TraceLoggingWrite(...,
     45 //   TelemetryPrivacyDataTag(PDT_BrowsingHistory | PDT_ProductAndServiceUsage),
     46 //   ...);
     47 #define TelemetryPrivacyDataTag(tag) TraceLoggingUInt64((tag), "PartA_PrivTags")
     48 #define PDT_BrowsingHistory                    0x0000000000000002u
     49 #define PDT_DeviceConnectivityAndConfiguration 0x0000000000000800u
     50 #define PDT_InkingTypingAndSpeechUtterance     0x0000000000020000u
     51 #define PDT_ProductAndServicePerformance       0x0000000001000000u
     52 #define PDT_ProductAndServiceUsage             0x0000000002000000u
     53 #define PDT_SoftwareSetupAndInventory          0x0000000080000000u
     54 
     55 // Event categories specified via keywords, e.g.:
     56 // TraceLoggingWrite(...,
     57 //     TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
     58 //     ...);
     59 #define MICROSOFT_KEYWORD_CRITICAL_DATA 0x0000800000000000 // Bit 47
     60 #define MICROSOFT_KEYWORD_MEASURES      0x0000400000000000 // Bit 46
     61 #define MICROSOFT_KEYWORD_TELEMETRY     0x0000200000000000 // Bit 45
     62 #define MICROSOFT_KEYWORD_RESERVED_44   0x0000100000000000 // Bit 44 (reserved for future assignment)
     63 
     64 // Event categories specified via event tags, e.g.:
     65 // TraceLoggingWrite(...,
     66 //     TraceLoggingEventTag(MICROSOFT_EVENTTAG_REALTIME_LATENCY),
     67 //     ...);
     68 #define MICROSOFT_EVENTTAG_DROP_USER_IDS            0x00008000
     69 #define MICROSOFT_EVENTTAG_AGGREGATE                0x00010000
     70 #define MICROSOFT_EVENTTAG_DROP_PII_EXCEPT_IP       0x00020000
     71 #define MICROSOFT_EVENTTAG_COSTDEFERRED_LATENCY     0x00040000
     72 #define MICROSOFT_EVENTTAG_CORE_DATA                0x00080000
     73 #define MICROSOFT_EVENTTAG_INJECT_XTOKEN            0x00100000
     74 #define MICROSOFT_EVENTTAG_REALTIME_LATENCY         0x00200000
     75 #define MICROSOFT_EVENTTAG_NORMAL_LATENCY           0x00400000
     76 #define MICROSOFT_EVENTTAG_CRITICAL_PERSISTENCE     0x00800000
     77 #define MICROSOFT_EVENTTAG_NORMAL_PERSISTENCE       0x01000000
     78 #define MICROSOFT_EVENTTAG_DROP_PII                 0x02000000
     79 #define MICROSOFT_EVENTTAG_HASH_PII                 0x04000000
     80 #define MICROSOFT_EVENTTAG_MARK_PII                 0x08000000
     81 
     82 // Field categories specified via field tags, e.g.:
     83 // TraceLoggingWrite(...,
     84 //     TraceLoggingString(szUser, "UserName", "User's name", MICROSOFT_FIELDTAG_HASH_PII),
     85 //     ...);
     86 #define MICROSOFT_FIELDTAG_DROP_PII 0x04000000
     87 #define MICROSOFT_FIELDTAG_HASH_PII 0x08000000