You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: opentelemetry-sdk/src/export/logs/mod.rs
+58-7
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,17 @@ use std::fmt::Debug;
18
18
///
19
19
#[derive(Debug)]
20
20
pubstructLogBatch<'a>{
21
-
/// The data field contains a slice of tuples, where each tuple consists of a reference to
22
-
/// a `LogRecord` and a reference to an `InstrumentationScope`.
23
-
data:&'a[(&'aLogRecord,&'aInstrumentationScope)],
21
+
data:LogBatchData<'a>,
22
+
}
23
+
24
+
/// The `LogBatchData` enum represents the data field of a `LogBatch`.
25
+
/// It can either be:
26
+
/// - A shared reference to a slice of boxed tuples, where each tuple consists of an owned `LogRecord` and an owned `InstrumentationScope`.
27
+
/// - Or it can be a shared reference to a slice of tuples, where each tuple consists of a reference to a `LogRecord` and a reference to an `InstrumentationScope`.
28
+
#[derive(Debug)]
29
+
enumLogBatchData<'a>{
30
+
BorrowedVec(&'a[Box<(LogRecord,InstrumentationScope)>]),// Used by BatchProcessor which clones the LogRecords for its own use.
0 commit comments