MCPcopy Create free account
hub / github.com/apache/brpc / PrintBthreadSpan

Function PrintBthreadSpan

src/brpc/builtin/rpcz_service.cpp:340–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340static 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
360static void PrintServerSpan(std::ostream& os, const RpczSpan& span,
361 bool use_html) {

Callers 1

PrintServerSpanFunction · 0.85

Calls 6

HexClass · 0.85
PrintAnnotationsFunction · 0.85
infoMethod · 0.80
parent_span_idMethod · 0.80
c_strMethod · 0.45
span_idMethod · 0.45

Tested by

no test coverage detected