Skip to content

Commit 0105bb6

Browse files
Copilotcijothomas
andcommitted
Remove test and add changelog entry for SdkLogger Clone implementation
Co-authored-by: cijothomas <[email protected]>
1 parent 8d5ba2e commit 0105bb6

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

opentelemetry-sdk/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- TODO: Placeholder for Span processor related things
66
- *Fix* SpanProcessor::on_start is no longer called on non recording spans
77
- **Fix**: Restore true parallel exports in the async-native `BatchSpanProcessor` by honoring `OTEL_BSP_MAX_CONCURRENT_EXPORTS` ([#2959](https://github.com/open-telemetry/opentelemetry-rust/pull/3028)). A regression in [#2685](https://github.com/open-telemetry/opentelemetry-rust/pull/2685) inadvertently awaited the `export()` future directly in `opentelemetry-sdk/src/trace/span_processor_with_async_runtime.rs` instead of spawning it on the runtime, forcing all exports to run sequentially.
8+
- **Feature**: Added `Clone` implementation to `SdkLogger` for consistency with `SdkTracer` ([#3058](https://github.com/open-telemetry/opentelemetry-rust/issues/3058)).
89

910
## 0.30.0
1011

opentelemetry-sdk/src/logs/logger.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,3 @@ impl opentelemetry::logs::Logger for SdkLogger {
6464
.any(|processor| processor.event_enabled(level, target, name))
6565
}
6666
}
67-
68-
#[cfg(test)]
69-
mod tests {
70-
use super::*;
71-
use crate::logs::SdkLoggerProvider;
72-
use opentelemetry::InstrumentationScope;
73-
74-
#[test]
75-
fn test_sdk_logger_clone() {
76-
let scope = InstrumentationScope::builder("test").build();
77-
let provider = SdkLoggerProvider::builder().build();
78-
let logger = SdkLogger::new(scope, provider);
79-
80-
// Test that clone works - this is the main goal
81-
#[allow(clippy::redundant_clone)]
82-
let cloned_logger = logger.clone();
83-
84-
// Verify that both loggers are valid by checking they have the same scope name
85-
assert_eq!(logger.scope.name(), cloned_logger.scope.name());
86-
}
87-
}

0 commit comments

Comments
 (0)