Skip to content

Commit

Permalink
Merge branch 'main' into remove-logs-enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored May 10, 2024
2 parents 69bffef + 736712d commit 2c8e5c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
- After `shutdown`, `LogProcessor` will not process any new logs
- Moving LogRecord implementation to the SDK. [1702](https://github.com/open-telemetry/opentelemetry-rust/pull/1702).
- Relocated `LogRecord` struct to SDK, as an implementation for the trait in the API.
- **Breaking** [#1729](https://github.com/open-telemetry/opentelemetry-rust/pull/1729)
- Update the return type of `TracerProvider.span_processors()` from `&Vec<Box<dyn SpanProcessor>>` to `&[Box<dyn SpanProcessor>]`.
- Update the return type of `LoggerProvider.log_processors()` from `&Vec<Box<dyn LogProcessor>>` to `&[Box<dyn LogProcessor>]`.

## v0.22.1

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/logs/log_emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl LoggerProvider {
}

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

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/trace/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl TracerProvider {
}

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

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/trace/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl Span {
data.end_time = opentelemetry::time::now();
}

match provider.span_processors().as_slice() {
match provider.span_processors() {
[] => {}
[processor] => {
processor.on_end(build_export_data(
Expand Down

0 comments on commit 2c8e5c1

Please sign in to comment.