| 338 | } |
| 339 | |
| 340 | static void PrintBthreadSpan(std::ostream& os, const RpczSpan& span, int64_t* last_time, |
| 341 | SpanInfoExtractor* server_extr, bool use_html) { |
| 342 | SpanInfoExtractor client_extr(span.info().c_str()); |
| 343 | int num_extr = 0; |
| 344 | SpanInfoExtractor* extr[2]; |
| 345 | if (server_extr) { |
| 346 | extr[num_extr++] = server_extr; |
| 347 | } |
| 348 | extr[num_extr++] = &client_extr; |
| 349 | |
| 350 | // Print span id for bthread span context identification |
| 351 | os << " [Bthread SPAN#" << Hex(span.span_id()); |
| 352 | if (span.parent_span_id() != 0) { |
| 353 | os << " parent#" << Hex(span.parent_span_id()); |
| 354 | } |
| 355 | os << "] "; |
| 356 | |
| 357 | PrintAnnotations(os, std::numeric_limits<int64_t>::max(), last_time, extr, num_extr, &span); |
| 358 | } |
| 359 | |
| 360 | static void PrintServerSpan(std::ostream& os, const RpczSpan& span, |
| 361 | bool use_html) { |
no test coverage detected