Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion opentelemetry-sdk/src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ mod tests {
}
}

fn on_end(&self, _span: SpanData) {}
fn on_end(&self, _span: SpanData) {
// TODO: Accessing Context::current() will panic today and hence commented out.
// See https://github.com/open-telemetry/opentelemetry-rust/issues/2871
// let _c = Context::current();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also add an ignored test using a TestSpanProcessor that accesses Context::current() in on_end(), to validate the expected behavior once it's safe.

}

fn force_flush(&self) -> crate::error::OTelSdkResult {
Ok(())
Expand Down