Skip to content

Commit 79270ce

Browse files
committed
fix: rename ensure_ended_and_exported to end_and_export
1 parent 2dd7ccf commit 79270ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

opentelemetry-sdk/src/trace/span.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,15 @@ impl opentelemetry::trace::Span for Span {
195195
if let Some(data) = self.data.as_mut() {
196196
data.end_time = timestamp;
197197
}
198-
self.ensure_ended_and_exported();
198+
self.end_and_export();
199199
}
200200
}
201201

202202
impl Span {
203203
/// Span ending logic
204204
///
205205
/// The end timestamp of the span has to be set before calling this function
206-
fn ensure_ended_and_exported(&mut self) {
206+
fn end_and_export(&mut self) {
207207
if self.tracer.provider().is_shutdown() {
208208
return;
209209
}
@@ -243,12 +243,12 @@ impl Drop for Span {
243243
/// Report span on inner drop
244244
fn drop(&mut self) {
245245
if let Some(ref mut data) = self.data {
246-
// if the span has not been ended, set the end time to now
246+
// if the span end_time has not been set, set it to now
247247
if data.end_time == data.start_time {
248248
data.end_time = opentelemetry::time::now();
249249
}
250250
}
251-
self.ensure_ended_and_exported();
251+
self.end_and_export();
252252
}
253253
}
254254

0 commit comments

Comments
 (0)