mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Conditional on context.isSampled in Span operator=().
In operator= overload we need to check if the current span which is being overwritten is eligble for serialization. If so we must send to the tracer via the g_tracer->trace(*this) call. Previously we were incorrectly checking the function argument o's context for sampling. This resulted in loss traces for the NAPI:readVersionBatcher spans.
This commit is contained in:
parent
7e3e79c53e
commit
bdef35390d
@ -441,7 +441,7 @@ void openTracer(TracerType type) {
|
|||||||
ITracer::~ITracer() {}
|
ITracer::~ITracer() {}
|
||||||
|
|
||||||
Span& Span::operator=(Span&& o) {
|
Span& Span::operator=(Span&& o) {
|
||||||
if (begin > 0.0 && o.context.isSampled() > 0) {
|
if (begin > 0.0 && context.isSampled()) {
|
||||||
end = g_network->now();
|
end = g_network->now();
|
||||||
g_tracer->trace(*this);
|
g_tracer->trace(*this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user