refactor(common): make init_observability sync with optional OTLP endpoint

Remove unnecessary async from init_observability -- body was fully sync.
Change otlp_endpoint from &str to Option<&str> -- when None, OTLP layer
is skipped (fmt-only mode). Update all 8 service callers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-01 22:41:52 +01:00
parent 2fe2e2fe8b
commit 0ac8aeee52
9 changed files with 19 additions and 18 deletions

View File

@@ -38,8 +38,8 @@ async fn main() -> Result<()> {
.unwrap_or_else(|_| "http://localhost:4317".to_string());
if let Err(e) = common::observability::init_observability(
"backtesting_service",
&otlp_endpoint,
).await {
Some(&otlp_endpoint),
) {
eprintln!("Failed to initialize observability: {}", e);
}