Skip to content

Commit 300d6d0

Browse files
committed
fix test
1 parent 90f5554 commit 300d6d0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

opentelemetry-sdk/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
asynchronously, it should clone the log data to ensure it can be safely processed without
2929
lifetime issues.
3030

31+
- **Breaking** [#1830](https://github.com/open-telemetry/opentelemetry-rust/pull/1830/files) [Traces SDK] Improves
32+
performance by sending Resource information to processors (and exporters) once, instead of sending with every log. If you are an author
33+
of Processor, Exporter, the following are *BREAKING* changes.
34+
- Implement `set_resource` method in your custom SpanProcessor, which invokes exporter's `set_resource`.
35+
- Implement `set_resource` method in your custom SpanExporter. This method should save the resource object
36+
in original or serialized format, to be merged with every span event during export.
37+
- `SpanData` doesn't have the resource attributes. The `SpanExporter::export()` method needs to merge it
38+
with the earlier preserved resource before export.
39+
3140
- **Breaking** [1836](https://github.com/open-telemetry/opentelemetry-rust/pull/1836) `SpanProcessor::shutdown` now takes an immutable reference to self. Any reference can call shutdown on the processor. After the first call to `shutdown` the processor will not process any new spans.
3241

3342
## v0.23.0

opentelemetry-sdk/src/trace/runtime_tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// need to run those tests one by one as the GlobalTracerProvider is a shared object between
33
// threads Use cargo test -- --ignored --test-threads=1 to run those tests.
44
use crate::export::trace::{ExportResult, SpanExporter};
5-
use crate::resource::Resource;
65
#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))]
76
use crate::runtime;
87
#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))]

opentelemetry-sdk/src/trace/span_processor.rs

-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,6 @@ mod tests {
690690
OTEL_BSP_SCHEDULE_DELAY, OTEL_BSP_SCHEDULE_DELAY_DEFAULT,
691691
};
692692
use crate::export::trace::{ExportResult, SpanData, SpanExporter};
693-
use crate::resource::Resource;
694693
use crate::runtime;
695694
use crate::testing::trace::{
696695
new_test_export_span_data, new_tokio_test_exporter, InMemorySpanExporterBuilder,

0 commit comments

Comments
 (0)