Skip to content

Commit

Permalink
Remove unsupported feature from BatchSpanProcessor (#2556)
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Jan 24, 2025
1 parent 14faca3 commit b2d3d74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ metadata, a feature introduced in version 0.1.40. [#2418](https://github.com/ope
.build();
```

This implementation does not support multiple concurrent exports
(`with_max_concurrent_exports` is not supported).

The new BatchLogProcessor can be used with OTLP Exporter, and supports
following exporter features:
- `grpc-tonic`: This requires `MeterProvider` to be created within a tokio
Expand Down
10 changes: 6 additions & 4 deletions opentelemetry-sdk/src/trace/span_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,12 @@ impl BatchConfigBuilder {
self
}

#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
/// Set max_concurrent_exports for [`BatchConfigBuilder`].
/// It's the maximum number of concurrent exports.
/// Limits the number of spawned tasks for exports and thus memory consumed by an exporter.
/// The default value is 1.
/// IF the max_concurrent_exports value is default value, it will cause exports to be performed
/// If the max_concurrent_exports value is default value, it will cause exports to be performed
/// synchronously on the BatchSpanProcessor task.
pub fn with_max_concurrent_exports(mut self, max_concurrent_exports: usize) -> Self {
self.max_concurrent_exports = max_concurrent_exports;
Expand Down Expand Up @@ -960,9 +961,10 @@ mod tests {
.with_max_export_batch_size(10)
.with_scheduled_delay(Duration::from_millis(10))
.with_max_export_timeout(Duration::from_millis(10))
.with_max_concurrent_exports(10)
.with_max_queue_size(10)
.build();
.with_max_queue_size(10);
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
let batch = batch.with_max_concurrent_exports(10);
let batch = batch.build();
assert_eq!(batch.max_export_batch_size, 10);
assert_eq!(batch.scheduled_delay, Duration::from_millis(10));
assert_eq!(batch.max_export_timeout, Duration::from_millis(10));
Expand Down

0 comments on commit b2d3d74

Please sign in to comment.