diff --git a/sdk/src/trace/tracer.cc b/sdk/src/trace/tracer.cc index 2e47c379f5..772aab671b 100644 --- a/sdk/src/trace/tracer.cc +++ b/sdk/src/trace/tracer.cc @@ -80,9 +80,10 @@ nostd::shared_ptr Tracer::StartSpan( auto span_context = std::unique_ptr(new opentelemetry::trace::SpanContext( trace_id, span_id, trace_flags, false, - sampling_result.trace_state ? sampling_result.trace_state - : is_parent_span_valid ? parent_context.trace_state() - : opentelemetry::trace::TraceState::GetDefault())); + sampling_result.trace_state + ? sampling_result.trace_state + : is_parent_span_valid ? parent_context.trace_state() + : opentelemetry::trace::TraceState::GetDefault())); if (!sampling_result.IsRecording()) {