Skip to content

Commit 0c477cd

Browse files
committed
refactor: remove multi-processor on_end optimization (superseded by #3410)
1 parent 794ce2f commit 0c477cd

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

opentelemetry-sdk/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- **Breaking** The SDK `testing` feature is now runtime agnostic. [#3407][3407]
66
- `TokioSpanExporter` and `new_tokio_test_exporter` have been renamed to `TestSpanExporter` and `new_test_exporter`.
77
- The following transitive dependencies and features have been removed: `tokio/rt`, `tokio/time`, `tokio/macros`, `tokio/rt-multi-thread`, `tokio-stream`, `experimental_async_runtime`
8-
- Store `InstrumentationScope` in `Arc` internally in `SdkTracer`, making tracer clones cheaper (Arc refcount increment instead of deep copy). The multi-processor span export path now builds export data once and clones for additional processors, instead of rebuilding per processor.
8+
- Store `InstrumentationScope` in `Arc` internally in `SdkTracer`, making tracer clones cheaper (Arc refcount increment instead of deep copy).
99
- Add 32-bit platform support by using `portable-atomic` for `AtomicI64` and `AtomicU64` in the metrics module. This enables compilation on 32-bit ARM targets (e.g., `armv5te-unknown-linux-gnueabi`, `armv7-unknown-linux-gnueabihf`).
1010
- `Aggregation` enum and `StreamBuilder::with_aggregation()` are now stable and no longer require the `spec_unstable_metrics_views` feature flag.
1111
- Fix `service.name` Resource attribute fallback to follow OpenTelemetry

opentelemetry-sdk/src/trace/span.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,13 @@ impl Span {
229229
));
230230
}
231231
processors => {
232-
let export_data = build_export_data(data, self.span_context.clone(), &self.tracer);
233-
let (last, rest) = processors.split_last().unwrap();
234-
for processor in rest {
235-
processor.on_end(export_data.clone());
232+
for processor in processors {
233+
processor.on_end(build_export_data(
234+
data.clone(),
235+
self.span_context.clone(),
236+
&self.tracer,
237+
));
236238
}
237-
last.on_end(export_data);
238239
}
239240
}
240241
}

0 commit comments

Comments
 (0)