File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
third-party/watchman/src/watchman/telemetry Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,28 @@ std::shared_ptr<StructuredLogger> getLogger() {
36
36
DynamicEvent WatchmanStructuredLogger::populateDefaultFields (
37
37
std::optional<const char *> type) {
38
38
DynamicEvent event = StructuredLogger::populateDefaultFields (type);
39
- if (sessionInfo_.ciInstanceId .has_value ()) {
40
- event.addInt (" sandcastle_instance_id" , *sessionInfo_.ciInstanceId );
41
- }
42
39
event.addString (" version" , sessionInfo_.appVersion );
43
40
#ifdef WATCHMAN_BUILD_INFO
44
41
event.addString (" buildinfo" , WATCHMAN_BUILD_INFO);
45
42
#endif
46
43
event.addString (" logged_by" , " watchman" );
44
+
45
+ const auto & fbInfo = sessionInfo_.fbInfo ;
46
+ for (const auto & info : fbInfo) {
47
+ const auto & key = info.first ;
48
+ const auto & value = info.second ;
49
+ std::visit (
50
+ [&](const auto & v) {
51
+ using T = std::decay_t <decltype (v)>;
52
+ if constexpr (std::is_same_v<T, std::string>) {
53
+ event.addString (key, v);
54
+ } else if constexpr (std::is_same_v<T, uint64_t >) {
55
+ event.addInt (key, v);
56
+ }
57
+ },
58
+ value);
59
+ }
60
+
47
61
return event;
48
62
}
49
63
You can’t perform that action at this time.
0 commit comments