Skip to content

Commit aadbe0b

Browse files
committed
Log OTel init failures instead of silently swallowing them
Use fprintf(stderr, ...) directly in the catch block — no need for a helper function when there's only one call site.
1 parent 3a6976e commit aadbe0b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/export/otel_exporter.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ bool OTelExporter::EstablishNewConnection() {
440440
logger = log_provider->GetLogger("pg_stat_ch", "pg_stat_ch_logs");
441441

442442
return true;
443-
} catch (const std::exception&) {
443+
} catch (const std::exception& e) {
444+
fprintf(stderr, "pg_stat_ch: OTel init failed: %s\n", e.what());
444445
return false;
445446
}
446447
}

0 commit comments

Comments
 (0)