File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
opentelemetry-otlp/src/exporter/tonic
opentelemetry-sdk/src/export/logs Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,16 @@ impl LogExporter for TonicLogsClient {
8080
8181 let resource_logs = group_logs_by_resource_and_scope ( batch, & self . resource ) ;
8282
83- otel_debug ! ( name: "TonicsLogsClient.CallingExport" ) ;
83+ otel_debug ! ( name: "TonicsLogsClient.CallingExport" ) ;
8484
85- client
86- . export ( Request :: from_parts (
87- metadata,
88- extensions,
89- ExportLogsServiceRequest { resource_logs } ,
90- ) )
91- . await
92- . map_err ( crate :: Error :: from) ?;
85+ client
86+ . export ( Request :: from_parts (
87+ metadata,
88+ extensions,
89+ ExportLogsServiceRequest { resource_logs } ,
90+ ) )
91+ . await
92+ . map_err ( crate :: Error :: from) ?;
9393 Ok ( ( ) )
9494 }
9595 }
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ pub trait LogExporter: Send + Sync + Debug {
7979 /// A `LogResult<()>`, which is a result type indicating either a successful export (with
8080 /// `Ok(())`) or an error (`Err(LogError)`) if the export operation failed.
8181 ///
82+ /// Note:
83+ /// The `Send` bound ensures the future can be safely moved across threads, which is crucial for multi-threaded async runtimes like Tokio.
84+ /// Explicit lifetimes (`'a`) synchronize the lifetimes of `self`, `batch`, and the returned future.
8285 fn export < ' a > (
8386 & ' a self ,
8487 batch : & ' a LogBatch < ' a > ,
You can’t perform that action at this time.
0 commit comments