Skip to content

Commit 7e3b5a4

Browse files
committed
Remove redundant test logs
1 parent 9dc727e commit 7e3b5a4

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

opentelemetry-otlp/tests/integration_test/src/test_utils.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ use anyhow::Result;
2222
use opentelemetry::{otel_debug, otel_info};
2323
use std::fs::{self, File, OpenOptions};
2424
use std::os::unix::fs::PermissionsExt;
25-
use std::sync::{Arc, Mutex, Once, OnceLock};
25+
use std::sync::{Arc, Mutex, OnceLock};
2626
use testcontainers::core::wait::HttpWaitStrategy;
2727
use testcontainers::core::{ContainerPort, Mount};
2828
use testcontainers::{core::WaitFor, runners::AsyncRunner, ContainerAsync, GenericImage, ImageExt};
29-
use tracing_subscriber::layer::SubscriberExt;
30-
use tracing_subscriber::util::SubscriberInitExt;
31-
use tracing_subscriber::{EnvFilter, Layer};
3229

3330
// Static references for container management
3431
static COLLECTOR_ARC: OnceLock<Mutex<Option<Arc<ContainerAsync<GenericImage>>>>> = OnceLock::new();
@@ -37,28 +34,8 @@ pub static METRICS_FILE: &str = "./actual/metrics.json";
3734
pub static LOGS_FILE: &str = "./actual/logs.json";
3835
pub static TRACES_FILE: &str = "./actual/traces.json";
3936

40-
static INIT_TRACING: Once = Once::new();
41-
42-
fn init_tracing() {
43-
INIT_TRACING.call_once(|| {
44-
// Info and above for all, debug for opentelemetry
45-
let filter_fmt =
46-
EnvFilter::new("info").add_directive("opentelemetry=debug".parse().unwrap());
47-
let fmt_layer = tracing_subscriber::fmt::layer()
48-
.with_thread_names(true)
49-
.with_filter(filter_fmt);
50-
51-
// Initialize the tracing subscriber with the OpenTelemetry layer and the
52-
// Fmt layer.
53-
tracing_subscriber::registry().with(fmt_layer).init();
54-
otel_info!(name: "tracing::fmt initializing completed! SDK internal logs will be printed to stdout.");
55-
});
56-
}
57-
5837
#[allow(clippy::await_holding_lock)]
5938
pub async fn start_collector_container() -> Result<()> {
60-
init_tracing();
61-
6239
let mut arc_guard = COLLECTOR_ARC
6340
.get_or_init(|| Mutex::new(None))
6441
.lock()

0 commit comments

Comments
 (0)