Skip to content

Commit 5fce0a5

Browse files
committed
review comment to move export_span_message_sent before actual export
1 parent 46aaac9 commit 5fce0a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry-sdk/src/trace/span_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ impl BatchSpanProcessor {
293293
match message_receiver.recv_timeout(remaining_time) {
294294
Ok(message) => match message {
295295
BatchMessage::ExportSpan(export_span_message_sent) => {
296+
// Reset the export span message sent flag now it has has been processed.
297+
export_span_message_sent.store(false, Ordering::Relaxed);
296298
otel_debug!(
297299
name: "BatchSpanProcessor.ExportingDueToBatchSize",
298300
);
@@ -304,8 +306,6 @@ impl BatchSpanProcessor {
304306
&current_batch_size,
305307
&config,
306308
);
307-
// Reset the export span message sent flag now it has has been processed.
308-
export_span_message_sent.store(false, Ordering::Relaxed);
309309
}
310310
BatchMessage::ForceFlush(sender) => {
311311
otel_debug!(name: "BatchSpanProcessor.ExportingDueToForceFlush");

0 commit comments

Comments
 (0)