| 584 | } |
| 585 | |
| 586 | void 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 | |
| 597 | static void Span2Proto(const Span* span, RpczSpan* out) { |
| 598 | out->set_trace_id(span->trace_id()); |
nothing calls this directly
no test coverage detected