You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change SpanExporter::export to take SpanBatch<'_> instead of
Vec<SpanData>, matching the LogBatch pattern already used in the
logs pipeline.
The key win is in BatchSpanProcessor: instead of calling
batch.split_off(0) on every export (which allocates a new Vec and
moves all elements), the processor now wraps the existing buffer
in a SpanBatch reference and clears it after export returns. This
eliminates one Vec allocation per export cycle.
Changes across 6 crates:
- opentelemetry-sdk: new SpanBatch<'a> type, updated processors
- opentelemetry-proto: added From<&SpanData> and From<&Link>,
group_spans_by_resource_and_scope now takes &[SpanData]
- opentelemetry-otlp: updated tonic and http trace exporters
- opentelemetry-stdout: updated trace exporter
- opentelemetry-zipkin: updated trace exporter
- benchmarks: updated no-op exporters
Breaking change: SpanExporter::export signature changed.
Implementors need to update their export method to accept
SpanBatch<'_> and use batch.iter() to access spans.
Copy file name to clipboardExpand all lines: opentelemetry-proto/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## vNext
4
4
5
+
- Added borrowing conversions (`From<&SpanData>`, `From<&Link>`) for trace proto types to support zero-copy span export. Changed `group_spans_by_resource_and_scope` to accept `&[SpanData]` instead of `Vec<SpanData>`.
Copy file name to clipboardExpand all lines: opentelemetry-sdk/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## vNext
4
4
5
+
-**Breaking**`SpanExporter::export` now takes `SpanBatch<'_>` instead of `Vec<SpanData>`, matching the borrowed `LogBatch` pattern used in the logs pipeline. This eliminates per-export `Vec` allocations in `BatchSpanProcessor`. Implementors should update their `export` signatures and use `batch.iter()` to access spans.
5
6
- 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`).
6
7
-`Aggregation` enum and `StreamBuilder::with_aggregation()` are now stable and no longer require the `spec_unstable_metrics_views` feature flag.
7
8
- Fix `service.name` Resource attribute fallback to follow OpenTelemetry
0 commit comments