Skip to content

Commit de3ea4e

Browse files
authored
Remov deprecated LogData structure (#2398)
1 parent a16fac6 commit de3ea4e

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

opentelemetry-sdk/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
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 struct:
22+
- logs::LogData - Previously deprecated in version 0.27.1
23+
Migration Guidance: This structure is no longer utilized within the SDK, and users should not have dependencies on it.
24+
2125
- *Breaking* Removed the following deprecated methods:
2226
- `Logger::provider()` : Previously deprecated in version 0.27.1
2327
- `Logger::instrumentation_scope()` : Previously deprecated in version 0.27.1.

opentelemetry-sdk/src/logs/mod.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,16 @@ pub use log_processor::{
1010
BatchConfig, BatchConfigBuilder, BatchLogProcessor, BatchLogProcessorBuilder, LogProcessor,
1111
SimpleLogProcessor,
1212
};
13-
use opentelemetry::InstrumentationScope;
1413
pub use record::{LogRecord, TraceContext};
1514

16-
#[deprecated(
17-
since = "0.27.1",
18-
note = "The struct is not used anywhere in the SDK and will be removed in the next major release."
19-
)]
20-
/// `LogData` represents a single log event without resource context.
21-
#[derive(Clone, Debug)]
22-
pub struct LogData {
23-
/// Log record
24-
pub record: LogRecord,
25-
/// Instrumentation details for the emitter who produced this `LogEvent`.
26-
pub instrumentation: InstrumentationScope,
27-
}
28-
2915
#[cfg(all(test, feature = "testing"))]
3016
mod tests {
3117
use super::*;
3218
use crate::testing::logs::InMemoryLogExporter;
3319
use crate::Resource;
3420
use opentelemetry::logs::LogRecord;
3521
use opentelemetry::logs::{Logger, LoggerProvider as _, Severity};
22+
use opentelemetry::InstrumentationScope;
3623
use opentelemetry::{logs::AnyValue, Key, KeyValue};
3724
use std::borrow::Borrow;
3825
use std::collections::HashMap;

0 commit comments

Comments
 (0)