diff --git a/src/common/telemetry/src/logging.rs b/src/common/telemetry/src/logging.rs index 0a60e35a0bd..04766c20dbc 100644 --- a/src/common/telemetry/src/logging.rs +++ b/src/common/telemetry/src/logging.rs @@ -234,7 +234,13 @@ pub fn init_global_logging( opentelemetry_otlp::new_exporter().tonic().with_endpoint( opts.otlp_endpoint .as_ref() - .map(|e| format!("http://{}", e)) + .map(|e| { + if e.starts_with("http") { + e.to_string() + } else { + format!("http://{}", e) + } + }) .unwrap_or(DEFAULT_OTLP_ENDPOINT.to_string()), ), )