1- use opentelemetry:: InstrumentationScope ;
1+ use opentelemetry:: { otel_info , InstrumentationScope } ;
22
33use crate :: error:: OTelSdkResult ;
44
@@ -13,21 +13,27 @@ use super::{LogBatch, LogExporter, LogProcessor, SdkLogRecord};
1313/// This is intended to be used when exporting to operating system
1414/// tracing facilities like Windows ETW, Linux TracePoints etc.
1515#[ derive( Debug ) ]
16- pub struct SimpleConcurrentProcessor < T : LogExporter > {
16+ pub struct SimpleConcurrentLogProcessor < T : LogExporter > {
1717 exporter : T ,
1818}
1919
20- impl < T : LogExporter > SimpleConcurrentProcessor < T > {
20+ impl < T : LogExporter > SimpleConcurrentLogProcessor < T > {
2121 /// Creates a new `ConcurrentExportProcessor` with the given exporter.
2222 pub fn new ( exporter : T ) -> Self {
2323 Self { exporter }
2424 }
2525}
2626
27- impl < T : LogExporter > LogProcessor for SimpleConcurrentProcessor < T > {
27+ impl < T : LogExporter > LogProcessor for SimpleConcurrentLogProcessor < T > {
2828 fn emit ( & self , record : & mut SdkLogRecord , instrumentation : & InstrumentationScope ) {
2929 let log_tuple = & [ ( record as & SdkLogRecord , instrumentation) ] ;
30- let _ = futures_executor:: block_on ( self . exporter . export ( LogBatch :: new ( log_tuple) ) ) ;
30+ let result = futures_executor:: block_on ( self . exporter . export ( LogBatch :: new ( log_tuple) ) ) ;
31+ if let Err ( err) = result {
32+ otel_info ! (
33+ name: "SimpleConcurrentLogProcessor.Emit.ExportError" ,
34+ error = format!( "{}" , err)
35+ ) ;
36+ }
3137 }
3238
3339 fn force_flush ( & self ) -> OTelSdkResult {
0 commit comments