Skip to content

Commit b2d3d74

Browse files
authored
Remove unsupported feature from BatchSpanProcessor (#2556)
1 parent 14faca3 commit b2d3d74

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

opentelemetry-sdk/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ metadata, a feature introduced in version 0.1.40. [#2418](https://github.com/ope
212212
.build();
213213
```
214214

215+
This implementation does not support multiple concurrent exports
216+
(`with_max_concurrent_exports` is not supported).
217+
215218
The new BatchLogProcessor can be used with OTLP Exporter, and supports
216219
following exporter features:
217220
- `grpc-tonic`: This requires `MeterProvider` to be created within a tokio

opentelemetry-sdk/src/trace/span_processor.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -717,11 +717,12 @@ impl BatchConfigBuilder {
717717
self
718718
}
719719

720+
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
720721
/// Set max_concurrent_exports for [`BatchConfigBuilder`].
721722
/// It's the maximum number of concurrent exports.
722723
/// Limits the number of spawned tasks for exports and thus memory consumed by an exporter.
723724
/// The default value is 1.
724-
/// IF the max_concurrent_exports value is default value, it will cause exports to be performed
725+
/// If the max_concurrent_exports value is default value, it will cause exports to be performed
725726
/// synchronously on the BatchSpanProcessor task.
726727
pub fn with_max_concurrent_exports(mut self, max_concurrent_exports: usize) -> Self {
727728
self.max_concurrent_exports = max_concurrent_exports;
@@ -960,9 +961,10 @@ mod tests {
960961
.with_max_export_batch_size(10)
961962
.with_scheduled_delay(Duration::from_millis(10))
962963
.with_max_export_timeout(Duration::from_millis(10))
963-
.with_max_concurrent_exports(10)
964-
.with_max_queue_size(10)
965-
.build();
964+
.with_max_queue_size(10);
965+
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
966+
let batch = batch.with_max_concurrent_exports(10);
967+
let batch = batch.build();
966968
assert_eq!(batch.max_export_batch_size, 10);
967969
assert_eq!(batch.scheduled_delay, Duration::from_millis(10));
968970
assert_eq!(batch.max_export_timeout, Duration::from_millis(10));

0 commit comments

Comments
 (0)