File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1717 . with_resource (Resource :: empty ())
1818 . build ();
1919 ```
20+ - `logs :: LogData ` struct is deprecated , and scheduled to be removed from public API in `v0 . 28.0 `.
2021
2122## 0.27 . 0
2223
Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE_DEFAULT: usize = 512;
4545pub trait LogProcessor : Send + Sync + Debug {
4646 /// Called when a log record is ready to processed and exported.
4747 ///
48- /// This method receives a mutable reference to `LogData `. If the processor
48+ /// This method receives a mutable reference to `LogRecord `. If the processor
4949 /// needs to handle the export asynchronously, it should clone the data to
5050 /// ensure it can be safely processed without lifetime issues. Any changes
5151 /// made to the log data in this method will be reflected in the next log
5252 /// processor in the chain.
5353 ///
5454 /// # Parameters
55- /// - `record`: A mutable reference to `LogData ` representing the log record.
55+ /// - `record`: A mutable reference to `LogRecord ` representing the log record.
5656 /// - `instrumentation`: The instrumentation scope associated with the log record.
5757 fn emit ( & self , data : & mut LogRecord , instrumentation : & InstrumentationScope ) ;
5858 /// Force the logs lying in the cache to be exported.
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ pub use log_processor::{
1313use opentelemetry:: InstrumentationScope ;
1414pub use record:: { LogRecord , TraceContext } ;
1515
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+ ) ]
1620/// `LogData` represents a single log event without resource context.
1721#[ derive( Clone , Debug ) ]
1822pub struct LogData {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use std::sync::{Arc, Mutex};
1010/// An in-memory logs exporter that stores logs data in memory..
1111///
1212/// This exporter is useful for testing and debugging purposes.
13- /// It stores logs in a `Vec<LogData >`. Logs can be retrieved using
13+ /// It stores logs in a `Vec<OwnedLogData >`. Logs can be retrieved using
1414/// `get_emitted_logs` method.
1515///
1616/// # Example
@@ -65,9 +65,9 @@ pub struct OwnedLogData {
6565pub struct LogDataWithResource {
6666 /// Log record
6767 pub record : LogRecord ,
68- /// Instrumentation details for the emitter who produced this `LogData `.
68+ /// Instrumentation details for the emitter who produced this `LogRecord `.
6969 pub instrumentation : InstrumentationScope ,
70- /// Resource for the emitter who produced this `LogData `.
70+ /// Resource for the emitter who produced this `LogRecord `.
7171 pub resource : Cow < ' static , Resource > ,
7272}
7373
@@ -137,7 +137,7 @@ impl InMemoryLogExporterBuilder {
137137}
138138
139139impl InMemoryLogExporter {
140- /// Returns the logs emitted via Logger as a vector of `LogData `.
140+ /// Returns the logs emitted via Logger as a vector of `LogDataWithResource `.
141141 ///
142142 /// # Example
143143 ///
You can’t perform that action at this time.
0 commit comments