Skip to content

Commit 8ba1173

Browse files
committed
initial change
1 parent a2aa648 commit 8ba1173

File tree

1 file changed

+10
-5
lines changed
  • opentelemetry-appender-tracing/src

1 file changed

+10
-5
lines changed

opentelemetry-appender-tracing/src/layer.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,16 @@ mod tests {
247247

248248
#[async_trait]
249249
impl LogExporter for ReentrantLogExporter {
250-
async fn export(&mut self, _batch: LogBatch<'_>) -> LogResult<()> {
251-
// This will cause a deadlock as the export itself creates a log
252-
// while still within the lock of the SimpleLogProcessor.
253-
warn!(name: "my-event-name", target: "reentrant", event_id = 20, user_name = "otel", user_email = "[email protected]");
254-
Ok(())
250+
fn export<'a>(
251+
&'a mut self,
252+
_batch: &'a LogBatch<'a>,
253+
) -> impl std::future::Future<Output = LogResult<()>> + Send + 'a {
254+
async {
255+
// This will cause a deadlock as the export itself creates a log
256+
// while still within the lock of the SimpleLogProcessor.
257+
warn!(name: "my-event-name", target: "reentrant", event_id = 20, user_name = "otel", user_email = "[email protected]");
258+
Ok(())
259+
}
255260
}
256261
}
257262

0 commit comments

Comments
 (0)