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

Method Submit

src/brpc/span.cpp:586–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void Span::Submit(std::shared_ptr<Span> span, int64_t cpuwide_time_us) {
587 // Only submit spans without a local parent (i.e., server spans).
588 // Server spans hold shared_ptr references to their child spans (via _client_list),
589 // ensuring child spans remain alive until the server span is submitted and dumped.
590 // Client spans are not submitted here because their lifetime is managed by their
591 // parent server span.
592 if (span->local_parent().expired()) {
593 span->submit(cpuwide_time_us);
594 }
595}
596
597static void Span2Proto(const Span* span, RpczSpan* out) {
598 out->set_trace_id(span->trace_id());

Callers

nothing calls this directly

Calls 2

local_parentMethod · 0.80
submitMethod · 0.45

Tested by

no test coverage detected