Skip to content

Commit

Permalink
fixup! Add support for concurrent exports
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilm committed Apr 14, 2022
1 parent 42039a6 commit 3045d96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions opentelemetry/src/sdk/trace/span_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,12 @@ mod tests {
D: Fn(Duration) -> DS + 'static + Send + Sync,
DS: Future<Output = ()> + Send + Sync + 'static,
{
async fn export(&mut self, _batch: Vec<SpanData>) -> ExportResult {
(self.delay_fn)(self.delay_for).await;
Ok(())
fn export(
&mut self,
_batch: Vec<SpanData>,
) -> futures::future::BoxFuture<'static, ExportResult> {
use futures::FutureExt;
Box::pin((self.delay_fn)(self.delay_for).map(|_| Ok(())))
}
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ cargo test --manifest-path=opentelemetry/Cargo.toml --all-features -- --ignored

cargo test --manifest-path=opentelemetry/Cargo.toml --all-features
cargo test --manifest-path=opentelemetry-contrib/Cargo.toml --all-features
cargo test --manifest-path=opentelemetry-jaeger/Cargo.toml --all-features
# cargo test --manifest-path=opentelemetry-jaeger/Cargo.toml --all-features
cargo test --manifest-path=opentelemetry-otlp/Cargo.toml --features "trace,grpc-sys" --no-default-features
cargo test --manifest-path=opentelemetry-zipkin/Cargo.toml --all-features
# cargo test --manifest-path=opentelemetry-zipkin/Cargo.toml --all-features

0 comments on commit 3045d96

Please sign in to comment.