Skip to content

Commit 2c8e5c1

Browse files
authored
Merge branch 'main' into remove-logs-enabled
2 parents 69bffef + 736712d commit 2c8e5c1

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

opentelemetry-sdk/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
- After `shutdown`, `LogProcessor` will not process any new logs
2929
- Moving LogRecord implementation to the SDK. [1702](https://github.com/open-telemetry/opentelemetry-rust/pull/1702).
3030
- Relocated `LogRecord` struct to SDK, as an implementation for the trait in the API.
31+
- **Breaking** [#1729](https://github.com/open-telemetry/opentelemetry-rust/pull/1729)
32+
- Update the return type of `TracerProvider.span_processors()` from `&Vec<Box<dyn SpanProcessor>>` to `&[Box<dyn SpanProcessor>]`.
33+
- Update the return type of `LoggerProvider.log_processors()` from `&Vec<Box<dyn LogProcessor>>` to `&[Box<dyn LogProcessor>]`.
3134

3235
## v0.22.1
3336

opentelemetry-sdk/src/logs/log_emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl LoggerProvider {
9191
}
9292

9393
/// Log processors associated with this provider.
94-
pub fn log_processors(&self) -> &Vec<Box<dyn LogProcessor>> {
94+
pub fn log_processors(&self) -> &[Box<dyn LogProcessor>] {
9595
&self.inner.processors
9696
}
9797

opentelemetry-sdk/src/trace/provider.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl TracerProvider {
6262
}
6363

6464
/// Span processors associated with this provider
65-
pub fn span_processors(&self) -> &Vec<Box<dyn SpanProcessor>> {
65+
pub fn span_processors(&self) -> &[Box<dyn SpanProcessor>] {
6666
&self.inner.processors
6767
}
6868

opentelemetry-sdk/src/trace/span.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl Span {
219219
data.end_time = opentelemetry::time::now();
220220
}
221221

222-
match provider.span_processors().as_slice() {
222+
match provider.span_processors() {
223223
[] => {}
224224
[processor] => {
225225
processor.on_end(build_export_data(

0 commit comments

Comments
 (0)