Skip to content

Commit c037576

Browse files
committed
test: strengthen multi-processor test with instrumentation_scope assertions
Verify that instrumentation_scope is correctly propagated to all processors in both the clone (rest) and move (last) paths. Also clarify changelog wording.
1 parent 8eea322 commit c037576

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

opentelemetry-sdk/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## vNext
44

5-
- 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 instead of per processor.
5+
- 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.
66
- 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`).
77
- `Aggregation` enum and `StreamBuilder::with_aggregation()` are now stable and no longer require the `spec_unstable_metrics_views` feature flag.
88
- Fix `service.name` Resource attribute fallback to follow OpenTelemetry

opentelemetry-sdk/src/trace/span.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,13 @@ mod tests {
733733
assert_eq!(spans1[0].name, "multi_processor_span");
734734
assert_eq!(spans2[0].name, "multi_processor_span");
735735
assert_eq!(spans1[0].attributes, spans2[0].attributes);
736+
// Verify instrumentation scope is correctly propagated to both processors
737+
assert_eq!(spans1[0].instrumentation_scope.name(), "test");
738+
assert_eq!(spans2[0].instrumentation_scope.name(), "test");
739+
assert_eq!(
740+
spans1[0].instrumentation_scope,
741+
spans2[0].instrumentation_scope
742+
);
736743

737744
let _ = provider.shutdown();
738745
}

0 commit comments

Comments
 (0)