Read oltp config from config and env (#4292)
This commit is contained in:
@@ -10,7 +10,11 @@ async fn main() -> Result<()> {
|
||||
let result = cli().await;
|
||||
|
||||
// Only wait for telemetry flush if OTLP is configured
|
||||
if std::env::var("OTEL_EXPORTER_OTLP_ENDPOINT").is_ok() {
|
||||
let should_wait = goose::config::Config::global()
|
||||
.get_param::<String>("otel_exporter_otlp_endpoint")
|
||||
.is_ok();
|
||||
|
||||
if should_wait {
|
||||
// Use a shorter, dynamic wait with max timeout
|
||||
let max_wait = tokio::time::Duration::from_millis(500);
|
||||
let start = tokio::time::Instant::now();
|
||||
|
||||
Reference in New Issue
Block a user