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

Method AsParent

src/brpc/span.h:108–110  ·  view source on GitHub ↗

Set this span as the TLS parent for subsequent child span creation. Typical flow: 1. Server span calls AsParent() before user callback to enable tracing 2. Client spans created in user code automatically link to this parent 3. When client RPC completes, it restores its own parent via AsParent() to maintain the trace chain (see Controller::SubmitSpan) 4. Server span calls EndAsParent() when submitt

Source from the content-addressed store, hash-verified

106 // to maintain the trace chain (see Controller::SubmitSpan)
107 // 4. Server span calls EndAsParent() when submitting to clear TLS parent
108 void AsParent() {
109 SetTlsParentSpan(shared_from_this());
110 }
111
112 // Add log with time.
113 void Annotate(const char* fmt, ...);

Callers 7

SubmitSpanMethod · 0.80
ProcessHttpRequestFunction · 0.80
ProcessSofaRequestFunction · 0.80
ProcessNsheadRequestFunction · 0.80
ProcessThriftRequestFunction · 0.80
ProcessRpcRequestFunction · 0.80
ProcessHuluRequestFunction · 0.80

Calls 1

SetTlsParentSpanFunction · 0.85

Tested by

no test coverage detected