| 93 | } |
| 94 | |
| 95 | void TJsonTraceConsumer::WriteArgs(const TEventArgs& args) { |
| 96 | struct TWriteArg { |
| 97 | NJsonWriter::TBuf* Output; |
| 98 | |
| 99 | void operator()(TStringBuf value) { |
| 100 | Output->WriteString(value); |
| 101 | } |
| 102 | |
| 103 | void operator()(i64 value) { |
| 104 | Output->WriteLongLong(value); |
| 105 | } |
| 106 | |
| 107 | void operator()(double value) { |
| 108 | Output->WriteDouble(value); |
| 109 | } |
| 110 | }; |
| 111 | |
| 112 | Json.WriteKey(TStringBuf("args")).BeginObject(); |
| 113 | for (const auto& item : args.Items) { |
| 114 | Json.WriteKey(item.Name); |
| 115 | std::visit(TWriteArg{&Json}, item.Value); |
| 116 | } |
| 117 | Json.EndObject(); |
| 118 | } |
| 119 | |
| 120 | void TJsonTraceConsumer::WriteFlow(const TEventFlow& flow) { |
| 121 | if (flow.Type == EFlowType::None) { |
nothing calls this directly
no test coverage detected