Skip to content

Commit b417e84

Browse files
authored
Remove Deprecated Logger Method (#2396)
1 parent 0156146 commit b417e84

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

opentelemetry-sdk/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
async fn export(&self, _batch: LogBatch<'_>) -> LogResult<()>
1919
Custom exporters will need to internally synchronize any mutable state, if applicable.
2020

21+
- *Breaking* Removed the following deprecated methods:
22+
- `Logger::provider()` : Previously deprecated in version 0.27.1
23+
- `Logger::instrumentation_scope()` : Previously deprecated in version 0.27.1.
24+
Migration Guidance:
25+
- These methods were intended for log appenders. Keep the clone of the provider handle, instead of depending on above methods.
26+
2127
## 0.27.1
2228

2329
Released 2024-Nov-27

opentelemetry-sdk/src/logs/log_emitter.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -257,21 +257,8 @@ impl Logger {
257257
Logger { scope, provider }
258258
}
259259

260-
#[deprecated(
261-
since = "0.27.1",
262-
note = "This method was intended for appender developers, but has no defined use-case in typical workflows. It is deprecated and will be removed in the next major release."
263-
)]
264-
/// LoggerProvider associated with this logger.
265-
pub fn provider(&self) -> &LoggerProvider {
266-
&self.provider
267-
}
268-
269-
#[deprecated(
270-
since = "0.27.1",
271-
note = "This method was intended for appender developers, but has no defined use-case in typical workflows. It is deprecated and will be removed in the next major release."
272-
)]
273-
/// Instrumentation scope of this logger.
274-
pub fn instrumentation_scope(&self) -> &InstrumentationScope {
260+
#[cfg(test)]
261+
pub(crate) fn instrumentation_scope(&self) -> &InstrumentationScope {
275262
&self.scope
276263
}
277264
}

0 commit comments

Comments
 (0)