Commit 3d352d8 1 parent 2ba2e7f commit 3d352d8 Copy full SHA for 3d352d8
File tree 4 files changed +11
-6
lines changed
4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 17
17
. with_resource (Resource :: empty ())
18
18
. build ();
19
19
```
20
+ - `logs :: LogData ` struct is deprecated , and scheduled to be removed from public API in `v0 . 28.0 `.
20
21
21
22
## 0.27 . 0
22
23
Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE_DEFAULT: usize = 512;
45
45
pub trait LogProcessor : Send + Sync + Debug {
46
46
/// Called when a log record is ready to processed and exported.
47
47
///
48
- /// This method receives a mutable reference to `LogData `. If the processor
48
+ /// This method receives a mutable reference to `LogRecord `. If the processor
49
49
/// needs to handle the export asynchronously, it should clone the data to
50
50
/// ensure it can be safely processed without lifetime issues. Any changes
51
51
/// made to the log data in this method will be reflected in the next log
52
52
/// processor in the chain.
53
53
///
54
54
/// # Parameters
55
- /// - `record`: A mutable reference to `LogData ` representing the log record.
55
+ /// - `record`: A mutable reference to `LogRecord ` representing the log record.
56
56
/// - `instrumentation`: The instrumentation scope associated with the log record.
57
57
fn emit ( & self , data : & mut LogRecord , instrumentation : & InstrumentationScope ) ;
58
58
/// 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::{
13
13
use opentelemetry:: InstrumentationScope ;
14
14
pub use record:: { LogRecord , TraceContext } ;
15
15
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
+ ) ]
16
20
/// `LogData` represents a single log event without resource context.
17
21
#[ derive( Clone , Debug ) ]
18
22
pub struct LogData {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use std::sync::{Arc, Mutex};
10
10
/// An in-memory logs exporter that stores logs data in memory..
11
11
///
12
12
/// 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
14
14
/// `get_emitted_logs` method.
15
15
///
16
16
/// # Example
@@ -65,9 +65,9 @@ pub struct OwnedLogData {
65
65
pub struct LogDataWithResource {
66
66
/// Log record
67
67
pub record : LogRecord ,
68
- /// Instrumentation details for the emitter who produced this `LogData `.
68
+ /// Instrumentation details for the emitter who produced this `LogRecord `.
69
69
pub instrumentation : InstrumentationScope ,
70
- /// Resource for the emitter who produced this `LogData `.
70
+ /// Resource for the emitter who produced this `LogRecord `.
71
71
pub resource : Cow < ' static , Resource > ,
72
72
}
73
73
@@ -137,7 +137,7 @@ impl InMemoryLogExporterBuilder {
137
137
}
138
138
139
139
impl 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 `.
141
141
///
142
142
/// # Example
143
143
///
You can’t perform that action at this time.
0 commit comments