Skip to content

Commit 6e1032f

Browse files
authored
Nit fix to LogProcessor tests (#2467)
1 parent 8d5f222 commit 6e1032f

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

opentelemetry-otlp/tests/integration_test/tests/logs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ mod logtests {
9494

9595
tokio::time::sleep(Duration::from_secs(10)).await;
9696

97-
assert_logs_results(test_utils::LOGS_FILE, "expected/logs.json");
97+
assert_logs_results(test_utils::LOGS_FILE, "expected/logs.json")?;
9898

9999
Ok(())
100100
}
@@ -122,7 +122,7 @@ mod logtests {
122122
}
123123
let _ = logger_provider.shutdown();
124124
// tokio::time::sleep(Duration::from_secs(10)).await;
125-
assert_logs_results(test_utils::LOGS_FILE, "expected/logs.json");
125+
assert_logs_results(test_utils::LOGS_FILE, "expected/logs.json")?;
126126

127127
Ok(())
128128
}

opentelemetry-otlp/tests/integration_test/tests/traces.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use anyhow::Result;
1313
use ctor::dtor;
1414
use integration_test_runner::test_utils;
1515
use opentelemetry_proto::tonic::trace::v1::TracesData;
16-
use opentelemetry_sdk::{runtime, trace as sdktrace, Resource};
16+
use opentelemetry_sdk::{trace as sdktrace, Resource};
1717
use std::fs::File;
1818
use std::io::Write;
1919
use std::os::unix::fs::MetadataExt;

opentelemetry-sdk/src/logs/log_processor.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,11 @@ impl<T: LogExporter> LogProcessor for SimpleLogProcessor<T> {
152152
#[allow(clippy::large_enum_variant)]
153153
#[derive(Debug)]
154154
enum BatchMessage {
155-
/// Export logs, usually called when the log is emitted.
155+
/// Export logs, called when the log is emitted.
156156
ExportLog(Box<(LogRecord, InstrumentationScope)>),
157-
/// Flush the current buffer to the backend, it can be triggered by
158-
/// pre configured interval or a call to `force_push` function.
159-
// Flush(Option<oneshot::Sender<ExportResult>>),
160-
/// ForceFlush flushes the current buffer to the backend.
157+
/// ForceFlush flushes the current buffer to the exporter.
161158
ForceFlush(mpsc::SyncSender<ExportResult>),
162-
/// Shut down the worker thread, push all logs in buffer to the backend.
159+
/// Shut down the worker thread, push all logs in buffer to the exporter.
163160
Shutdown(mpsc::SyncSender<ExportResult>),
164161
/// Set the resource for the exporter.
165162
SetResource(Arc<Resource>),

0 commit comments

Comments
 (0)