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