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:
Ray Jenkins 2022-07-13 16:56:33 -05:00 committed by Lukas Joswiak
parent 7e3e79c53e
commit bdef35390d

View File

@ -441,7 +441,7 @@ void openTracer(TracerType type) {
ITracer::~ITracer() {}
Span& Span::operator=(Span&& o) {
if (begin > 0.0 && o.context.isSampled() > 0) {
if (begin > 0.0 && context.isSampled()) {
end = g_network->now();
g_tracer->trace(*this);
}